feat: 审批/执行角色权限校验 + LDAP用户禁止重置密码
- ticket.go: ApproveTicket 前置角色检查(admin/dba/auditor),ExecuteTicket 前置角色检查(admin/dba) - ticket.go: 创建工单时自动从 instance.workflow_id 读取关联审批流程 - UsersPage.tsx: LDAP 用户重置密码按钮置灰(disabled+opacity-30+提示文案) - 权限模型: 审核=管理员/DBA/审核员, 执行=管理员/DBA, 提交=所有角色
This commit is contained in:
1 parent
b4c982d565
commit
bef2f98f28
2 files changed
+43
-27
No files matched your search
@@ -487,9 +487,10 @@ export default function UsersPage() {
|
||||
<Edit2 className="w-4 h-4" />
|
||||
</button>
|
||||
<button
|
||||
onClick={() => setShowResetPwd(user)}
|
||||
className="p-1.5 rounded-md hover:bg-[var(--dg-bg-tertiary)] text-[var(--dg-text-muted)] hover:text-yellow-400 transition-colors"
|
||||
title="重置密码"
|
||||
onClick={() => user.auth_source !== 'ldap' && setShowResetPwd(user)}
|
||||
className={`p-1.5 rounded-md transition-colors ${user.auth_source === 'ldap' ? 'opacity-30 cursor-not-allowed' : 'hover:bg-[var(--dg-bg-tertiary)] text-[var(--dg-text-muted)] hover:text-yellow-400'}`}
|
||||
title={user.auth_source === 'ldap' ? 'LDAP 用户密码由 LDAP 服务器管理' : '重置密码'}
|
||||
disabled={user.auth_source === 'ldap'}
|
||||
>
|
||||
<KeyRound className="w-4 h-4" />
|
||||
</button>
|
||||
|
||||
Reference in new issue
Block a user