mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-11 20:29:40 +00:00
perf: 添加 is_org_admin (#7644)
* fix: 修复 org members 的问题 * perf: 修改 org member * perf: 修改 is sa * perf: 修改 active * perf: 修复写法 * perf: is_sa to is_service_account Co-authored-by: ibuler <ibuler@qq.com>
This commit is contained in:
@@ -49,10 +49,10 @@ class Role(JMSModel):
|
||||
return '%s(%s)' % (self.name, self.get_scope_display())
|
||||
|
||||
def is_system_admin(self):
|
||||
return self.name == self.BuiltinRole.system_admin.name and self.builtin
|
||||
return self.id == self.BuiltinRole.system_admin.id and self.builtin
|
||||
|
||||
def is_org_admin(self):
|
||||
return self.name == self.BuiltinRole.org_admin.name and self.builtin
|
||||
return self.id == self.BuiltinRole.org_admin.id and self.builtin
|
||||
|
||||
def is_admin(self):
|
||||
yes = self.is_system_admin() or self.is_org_admin()
|
||||
|
Reference in New Issue
Block a user