完善登录页分角色密码重置流程并保留安全中心入口
This commit is contained in:
1 parent
5d21c71720
commit
8e5fd95ebd
14 files changed
+952
-50
No files matched your search
@@ -399,6 +399,9 @@ func (s *Service) CompleteWithContext(ticketID, newPassword, browserContext stri
|
||||
if err != nil || !has || user.Disabled != 0 || user.EffectiveRole() == access.RoleSuperAdmin || user.SessionVersion != item.SessionVersion {
|
||||
return ErrRecoveryDenied
|
||||
}
|
||||
if user.EffectiveRole() == access.RoleAdmin && item.Method != "email_admin" {
|
||||
return ErrRecoveryDenied
|
||||
}
|
||||
if item.Method == "email" || item.Method == "email_admin" {
|
||||
if user.EffectiveRole() == access.RoleAdmin && item.Method != "email_admin" {
|
||||
return ErrRecoveryDenied
|
||||
|
||||
Reference in new issue
Block a user