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.
49 lines
2.3 KiB
TypeScript
49 lines
2.3 KiB
TypeScript
export default {
|
|
'users.title': '用户',
|
|
'users.button.create': '添加用户',
|
|
'users.form.edit': '编辑用户',
|
|
'users.form.create': '添加用户',
|
|
'users.table.username': '用户名',
|
|
'users.table.role': '角色',
|
|
'users.table.status': '状态',
|
|
'users.status.active': '启用',
|
|
'users.status.inactive': '停用',
|
|
'users.form.active': '启用账户',
|
|
'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': '普通用户',
|
|
'users.form.newpassword': '新密码',
|
|
'users.form.currentpassword': '当前密码',
|
|
'users.form.updatepassword': '修改密码',
|
|
'users.form.rule.password':
|
|
'包含大小写字母、数字和特殊字符(!@#$%^&*_+),6至64个字符,不允许有空格',
|
|
'users.password.uppcase': '至少包含一个大写字母',
|
|
'users.password.lowercase': '至少包含一个小写字母',
|
|
'users.password.number': '至少包含一个数字',
|
|
'users.password.special': '至少包含一个特殊字符',
|
|
'users.password.length': '长度在6至64个字符之间',
|
|
'users.password.modify.title': '修改密码',
|
|
'users.password.modify.description': '为了确保您的账户安全,请修改初始密码',
|
|
'users.password.modify.tips': '定期更新密码有助于保护账户安全。',
|
|
'users.password.confirm': '确认新密码',
|
|
'users.password.confirm.empty': '请确认新密码',
|
|
'users.password.confirm.error': '两次输入的密码不一致',
|
|
'users.login.title': '登录',
|
|
'users.version.islatest': 'GPUStack {version} 已是最新版本',
|
|
'users.version.update': 'GPUStack {version} 版本可供更新',
|
|
'users.settings.title': '用户设置',
|
|
'users.status.activate': '启用账户',
|
|
'users.status.deactivate': '停用账户',
|
|
'users.status.inactiveAccount': '停用账户',
|
|
'users.login.getInitialPassword':
|
|
'在 GPUStack Server 节点运行以下命令以获取初始管理员密码。'
|
|
};
|