From 768ddaed31ad11e6db3d2cb96ce947365b5bdfb3 Mon Sep 17 00:00:00 2001 From: Chris Meyers Date: Tue, 17 Jan 2017 13:22:47 -0500 Subject: [PATCH] add org to permission team role related to #3326 * Reduce confusion when 2 teams with the same name, belonging to diff orgs, are given permission to the same resource. The confusion is eliminated by showing the org that a team role belongs to in the tooltip. --- awx/api/serializers.py | 3 ++- .../client/src/access/rbac-role-column/roleList.partial.html | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/awx/api/serializers.py b/awx/api/serializers.py index 649d55fe4c..8824a8b881 100644 --- a/awx/api/serializers.py +++ b/awx/api/serializers.py @@ -1620,7 +1620,8 @@ class ResourceAccessListElementSerializer(UserSerializer): 'name': role.name, 'description': role.description, 'team_id': team_role.object_id, - 'team_name': team_role.content_object.name + 'team_name': team_role.content_object.name, + 'team_organization_name': team_role.content_object.organization.name, } if role.content_type is not None: role_dict['resource_name'] = role.content_object.name diff --git a/awx/ui/client/src/access/rbac-role-column/roleList.partial.html b/awx/ui/client/src/access/rbac-role-column/roleList.partial.html index 1a25afead0..7560090ee5 100644 --- a/awx/ui/client/src/access/rbac-role-column/roleList.partial.html +++ b/awx/ui/client/src/access/rbac-role-column/roleList.partial.html @@ -9,7 +9,7 @@
+ aw-tool-tip='
Organization: {{ entry.team_organization_name }}
Team: {{entry.team_name | sanitize}}
' aw-tip-placement='bottom'> {{ entry.name }}