feat(users): add authentication source dropdown to the user form
The add / edit user drawer now exposes a Source select (Local / OIDC /
SAML / CAS) so an admin can flip an existing account between Local
password and an external IdP without touching the database. Mirrors
the matching `PUT /v1/users/{id}` change on the backend.
Password field follows the selected source:
* Hidden when source != Local — those users authenticate via the IdP
and a local password row would be a /login bypass.
* Required when CREATE-with-Local, or when EDIT is switching an SSO
user back to Local (the backend rejects SSO -> Local without a
fresh password to avoid locking the user out of /login).
* Optional when editing an already-Local user, matching today's
behaviour.
A switch in EDIT mode surfaces a tip explaining the side effect
(password cleared / new password required) so the consequence isn't
hidden. The Source select is disabled on self-edit — same guard the
role column already uses — so an admin can't lock themselves out by
flipping their own row to an external source.
Strings are added to all five locales; the IdP protocol acronyms
(OIDC / SAML / CAS) render verbatim and don't need translation keys.
This commit is contained in:
@@ -12,6 +12,11 @@ export default {
|
||||
'users.form.active.description': 'Enable or disable this user account',
|
||||
'users.form.fullname': 'Full Name',
|
||||
'users.form.source': 'Source',
|
||||
'users.form.source.local': 'Local',
|
||||
'users.form.source.tip.switchToLocal':
|
||||
'Switching to Local requires a new password. The user will sign in via the standard login form.',
|
||||
'users.form.source.tip.switchToExternal':
|
||||
"Switching to an external source clears the user's local password. They will sign in via the configured identity provider.",
|
||||
'users.table.user': 'users',
|
||||
'users.form.admin': 'Admin',
|
||||
'users.form.user': 'User',
|
||||
|
||||
@@ -13,6 +13,11 @@ export default {
|
||||
'このユーザーアカウントを有効または無効にする',
|
||||
'users.form.fullname': 'フルネーム',
|
||||
'users.form.source': 'ソース',
|
||||
'users.form.source.local': 'ローカル',
|
||||
'users.form.source.tip.switchToLocal':
|
||||
'ローカルに切り替えるには新しいパスワードが必要です。以後、ユーザーは標準のログインフォームからサインインします。',
|
||||
'users.form.source.tip.switchToExternal':
|
||||
'外部ソースに切り替えるとユーザーのローカルパスワードが削除され、設定済みの ID プロバイダーからサインインするようになります。',
|
||||
'users.table.user': 'ユーザー',
|
||||
'users.form.admin': '管理者',
|
||||
'users.form.user': '一般ユーザー',
|
||||
|
||||
@@ -13,6 +13,11 @@ export default {
|
||||
'Включить или отключить эту учетную запись пользователя',
|
||||
'users.form.fullname': 'Полное имя',
|
||||
'users.form.source': 'Источник',
|
||||
'users.form.source.local': 'Локальный',
|
||||
'users.form.source.tip.switchToLocal':
|
||||
'Переключение на «Локальный» требует ввода нового пароля. После этого пользователь будет входить через стандартную форму входа.',
|
||||
'users.form.source.tip.switchToExternal':
|
||||
'Переключение на внешний источник удаляет локальный пароль пользователя. После этого вход будет выполняться через настроенного провайдера идентификации.',
|
||||
'users.table.user': 'пользователи',
|
||||
'users.form.admin': 'Администратор',
|
||||
'users.form.user': 'Пользователь',
|
||||
|
||||
@@ -13,6 +13,11 @@ export default {
|
||||
'Bu kullanıcı hesabını etkinleştir veya devre dışı bırak',
|
||||
'users.form.fullname': 'Tam Ad',
|
||||
'users.form.source': 'Kaynak',
|
||||
'users.form.source.local': 'Yerel',
|
||||
'users.form.source.tip.switchToLocal':
|
||||
'Yerel kaynağa geçmek yeni bir parola gerektirir. Kullanıcı bundan sonra standart oturum açma formunu kullanır.',
|
||||
'users.form.source.tip.switchToExternal':
|
||||
'Harici bir kaynağa geçmek kullanıcının yerel parolasını siler. Kullanıcı bundan sonra yapılandırılmış kimlik sağlayıcı üzerinden oturum açar.',
|
||||
'users.table.user': 'kullanıcılar',
|
||||
'users.form.admin': 'Yönetici',
|
||||
'users.form.user': 'Kullanıcı',
|
||||
|
||||
@@ -12,6 +12,11 @@ export default {
|
||||
'users.form.active.description': '启用或禁用此用户账户',
|
||||
'users.form.fullname': '全名',
|
||||
'users.form.source': '来源',
|
||||
'users.form.source.local': '本地',
|
||||
'users.form.source.tip.switchToLocal':
|
||||
'切换到本地需要设置新密码,之后用户将通过标准登录表单登录。',
|
||||
'users.form.source.tip.switchToExternal':
|
||||
'切换到外部来源会清除该用户的本地密码,之后用户将通过所配置的身份提供商登录。',
|
||||
'users.table.user': '用户',
|
||||
'users.form.admin': '管理员',
|
||||
'users.form.user': '普通用户',
|
||||
|
||||
Reference in New Issue
Block a user