Add in missing read permissions for organization audit role (#15318)

* Add in missing read permissions for organization audit role

* Add missing audit permission, special case name handling
This commit is contained in:
Alan Rominger
2024-07-02 15:20:40 -04:00
committed by GitHub
parent 6763badea3
commit c4688d6298
4 changed files with 36 additions and 3 deletions

View File

@@ -602,8 +602,9 @@ def get_role_from_object_role(object_role):
elif rd.name.endswith(' Admin'):
# cases like "project-admin"
role_name = 'admin_role'
elif rd.name == 'Organization Audit':
role_name = 'auditor_role'
else:
print(rd.name)
model_name, role_name = rd.name.split()
role_name = role_name.lower()
role_name += '_role'