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:
Chris Meyers
2017-01-17 13:22:47 -05:00
parent a8802f38aa
commit 768ddaed31
2 changed files with 3 additions and 2 deletions

View File

@@ -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