mirror of
https://github.com/ansible/awx.git
synced 2026-05-10 02:47:36 -02:30
Merge pull request #6438 from jakemcdermott/6433-fix-org-team-rbac-save-api
Identify user-only object roles Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
@@ -1280,6 +1280,14 @@ class OrganizationSerializer(BaseSerializer):
|
|||||||
'job_templates': 0, 'admins': 0, 'projects': 0}
|
'job_templates': 0, 'admins': 0, 'projects': 0}
|
||||||
else:
|
else:
|
||||||
summary_dict['related_field_counts'] = counts_dict[obj.id]
|
summary_dict['related_field_counts'] = counts_dict[obj.id]
|
||||||
|
|
||||||
|
# Organization participation roles (admin, member) can't be assigned
|
||||||
|
# to a team. This provides a hint to the ui so it can know to not
|
||||||
|
# display these roles for team role selection.
|
||||||
|
for key in ('admin_role', 'member_role',):
|
||||||
|
if key in summary_dict.get('object_roles', {}):
|
||||||
|
summary_dict['object_roles'][key]['user_only'] = True
|
||||||
|
|
||||||
return summary_dict
|
return summary_dict
|
||||||
|
|
||||||
def validate(self, attrs):
|
def validate(self, attrs):
|
||||||
|
|||||||
Reference in New Issue
Block a user