mirror of
https://github.com/ansible/awx.git
synced 2026-03-19 18:07:33 -02:30
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.
This commit is contained in:
@@ -1620,7 +1620,8 @@ class ResourceAccessListElementSerializer(UserSerializer):
|
|||||||
'name': role.name,
|
'name': role.name,
|
||||||
'description': role.description,
|
'description': role.description,
|
||||||
'team_id': team_role.object_id,
|
'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:
|
if role.content_type is not None:
|
||||||
role_dict['resource_name'] = role.content_object.name
|
role_dict['resource_name'] = role.content_object.name
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<div class="RoleList-tag"
|
<div class="RoleList-tag"
|
||||||
ng-class="{'RoleList-tag--deletable': entry.explicit && entry.user_capabilities.unattach,
|
ng-class="{'RoleList-tag--deletable': entry.explicit && entry.user_capabilities.unattach,
|
||||||
'RoleList-tag--team': entry.team_id}"
|
'RoleList-tag--team': entry.team_id}"
|
||||||
aw-tool-tip='{{entry.team_name | sanitize}}' aw-tip-placement='bottom'>
|
aw-tool-tip='<div>Organization: {{ entry.team_organization_name }}</div><div>Team: {{entry.team_name | sanitize}}</div>' aw-tip-placement='bottom'>
|
||||||
<span class="RoleList-name">{{ entry.name }}</span>
|
<span class="RoleList-name">{{ entry.name }}</span>
|
||||||
<i ng-show='entry.team_id' class="fa fa-users"></i>
|
<i ng-show='entry.team_id' class="fa fa-users"></i>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user