mirror of
https://github.com/ansible/awx.git
synced 2026-01-12 02:19:58 -03:30
Merge pull request #1700 from wwitzel3/issue-1429
Fixing CredentialList post access check
This commit is contained in:
commit
d418a09bfc
@ -1240,7 +1240,7 @@ class CredentialList(ListCreateAPIView):
|
||||
organization = Organization.objects.get(pk=request.data['organization'])
|
||||
obj = organization
|
||||
|
||||
if self.request.user not in obj.admin_role:
|
||||
if not self.request.user.can_access(type(obj), 'change', obj, request.data):
|
||||
raise PermissionDenied()
|
||||
|
||||
ret = super(CredentialList, self).post(request, *args, **kwargs)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user