|
|
@ -151,7 +151,7 @@ class BuiltinRole: |
|
|
|
'User': cls.system_user.get_role(), |
|
|
|
'User': cls.system_user.get_role(), |
|
|
|
'Auditor': cls.system_auditor.get_role() |
|
|
|
'Auditor': cls.system_auditor.get_role() |
|
|
|
} |
|
|
|
} |
|
|
|
return cls.system_role_mapper[name] |
|
|
|
return cls.system_role_mapper.get(name, cls.system_role_mapper['User']) |
|
|
|
|
|
|
|
|
|
|
|
@classmethod |
|
|
|
@classmethod |
|
|
|
def get_org_role_by_old_name(cls, name): |
|
|
|
def get_org_role_by_old_name(cls, name): |
|
|
@ -161,7 +161,7 @@ class BuiltinRole: |
|
|
|
'User': cls.org_user.get_role(), |
|
|
|
'User': cls.org_user.get_role(), |
|
|
|
'Auditor': cls.org_auditor.get_role(), |
|
|
|
'Auditor': cls.org_auditor.get_role(), |
|
|
|
} |
|
|
|
} |
|
|
|
return cls.org_role_mapper[name] |
|
|
|
return cls.org_role_mapper.get(name, cls.org_role_mapper['User']) |
|
|
|
|
|
|
|
|
|
|
|
@classmethod |
|
|
|
@classmethod |
|
|
|
def sync_to_db(cls, show_msg=False): |
|
|
|
def sync_to_db(cls, show_msg=False): |
|
|
|