mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-07 18:31:04 +00:00
[Update] 用户Profile添加在当前组织的角色
This commit is contained in:
@@ -159,6 +159,14 @@ class RoleMixin:
|
||||
roles.append(str(_('User')))
|
||||
return " | ".join(roles)
|
||||
|
||||
def current_org_roles(self):
|
||||
roles = []
|
||||
if self.can_admin_current_org:
|
||||
roles.append('Admin')
|
||||
if self.can_audit_current_org:
|
||||
roles.append('Auditor')
|
||||
return roles
|
||||
|
||||
@property
|
||||
def is_superuser(self):
|
||||
if self.role == 'Admin':
|
||||
|
Reference in New Issue
Block a user