mirror of
https://github.com/ansible/awx.git
synced 2026-06-28 01:48:01 -02:30
Fix EE admin not being able to PATCH/PUT object while providing organization (#15348)
* Fix bug where EE object-level admin could not set organization * Finish polishing up test
This commit is contained in:
@@ -1419,10 +1419,6 @@ class ExecutionEnvironmentAccess(BaseAccess):
|
||||
else:
|
||||
if self.user not in obj.organization.execution_environment_admin_role:
|
||||
raise PermissionDenied
|
||||
if data and 'organization' in data:
|
||||
new_org = get_object_from_data('organization', Organization, data, obj=obj)
|
||||
if not new_org or self.user not in new_org.execution_environment_admin_role:
|
||||
return False
|
||||
return self.check_related('organization', Organization, data, obj=obj, role_field='execution_environment_admin_role')
|
||||
|
||||
def can_delete(self, obj):
|
||||
|
||||
Reference in New Issue
Block a user