diff --git a/src/webui/internal/handlers/configure_users.go b/src/webui/internal/handlers/configure_users.go index 4d674576..24975d84 100644 --- a/src/webui/internal/handlers/configure_users.go +++ b/src/webui/internal/handlers/configure_users.go @@ -104,13 +104,27 @@ func (h *ConfigureUsersHandler) Overview(w http.ResponseWriter, r *http.Request) const shellPath = "/ietf-system:system/authentication/user/infix-system:shell" mgr := h.Schema.Manager() data.Loading = mgr == nil + var defaultShell string if mgr != nil { data.ShellOptions = schema.OptionsFor(mgr, shellPath) + for _, o := range data.ShellOptions { + if o.IsDefault { + defaultShell = o.Label + break + } + } } for _, u := range raw.System.Auth.Users { + // Effective shell: the user's explicit shell, else the YANG default. + // Kept bare (no module prefix) so the static cell and the editor's + // selected-option test compare directly against the option .Label. + shell := schema.StripModulePrefix(u.Shell) + if shell == "" { + shell = defaultShell + } data.Users = append(data.Users, cfgUserDisplay{ cfgUserJSON: u, - ShellLabel: schema.StripModulePrefix(u.Shell), + ShellLabel: shell, KeyCount: len(u.AuthorizedKeys), }) } diff --git a/src/webui/static/css/style.css b/src/webui/static/css/style.css index e63cb44e..1cc9924b 100644 --- a/src/webui/static/css/style.css +++ b/src/webui/static/css/style.css @@ -2691,13 +2691,12 @@ details.cfg-fold[open] > summary::before { transform: rotate(90deg); } .btn-add-row:hover { text-decoration: underline; } /* Inline forms inside users table */ -.user-shell-form, .user-add-inline { +.user-add-inline { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; } -.user-shell-form .cfg-input { flex: 1; min-width: 0; } .user-add-inline .cfg-input { width: auto; flex: 1; min-width: 8rem; } /* Add Interface modal dialog */ diff --git a/src/webui/templates/pages/configure-users.html b/src/webui/templates/pages/configure-users.html index 447beddb..d0decf22 100644 --- a/src/webui/templates/pages/configure-users.html +++ b/src/webui/templates/pages/configure-users.html @@ -43,17 +43,7 @@ {{.Name}} - -
- - - -
- + {{.ShellLabel}} {{.KeyCount}} + + + + {{/* Change password */}}
Change Password
@@ -145,8 +150,10 @@ {{/* Hidden add-user row — revealed by the + Add user button */}} - +