mirror of
https://github.com/ansible/awx.git
synced 2026-06-24 16:17:51 -02:30
Loosen up team EE restrictions (#15384)
* Try to loosen up team EE restrictions * Fix missed permission case of nulling EE org
This commit is contained in:
@@ -66,7 +66,3 @@ class ExecutionEnvironment(CommonModel):
|
||||
|
||||
if actor._meta.model_name == 'user' and (not actor.has_obj_perm(self.organization, 'view')):
|
||||
raise ValidationError({'user': _('User must have view permission to Execution Environment organization')})
|
||||
if actor._meta.model_name == 'team':
|
||||
organization_cls = self._meta.get_field('organization').related_model
|
||||
if self.organization not in organization_cls.access_qs(actor, 'view'):
|
||||
raise ValidationError({'team': _('Team must have view permission to Execution Environment organization')})
|
||||
|
||||
Reference in New Issue
Block a user