mirror of
https://github.com/ansible/awx.git
synced 2026-01-15 03:40:42 -03:30
Add missing permission check.
This commit is contained in:
parent
2c4a16369d
commit
f11a220e64
@ -1873,6 +1873,8 @@ class GroupChildrenList(EnforceParentRelationshipMixin, SubListCreateAttachDetac
|
||||
if sub_id is not None:
|
||||
return super(GroupChildrenList, self).unattach(request, *args, **kwargs)
|
||||
parent = self.get_parent_object()
|
||||
if not request.user.can_access(self.model, 'delete', parent):
|
||||
raise PermissionDenied()
|
||||
parent.delete()
|
||||
return Response(status=status.HTTP_204_NO_CONTENT)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user