mirror of
https://github.com/ZwareBear/awx.git
synced 2026-04-20 15:01:48 -05:00
Merge pull request #2714 from wwitzel3/issue-2706
ensure the singleton roles show up for sys auditor / sys admins
This commit is contained in:
@@ -1192,6 +1192,7 @@ class UserRolesList(SubListCreateAttachDetachAPIView):
|
||||
if not self.request.user.can_access(User, 'read', u):
|
||||
raise PermissionDenied()
|
||||
content_type = ContentType.objects.get_for_model(User)
|
||||
|
||||
return Role.filter_visible_roles(self.request.user, u.roles.all()) \
|
||||
.exclude(content_type=content_type, object_id=u.id)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user