restore project_admin as role for project creation

This commit is contained in:
AlanCoding 2018-07-11 15:36:48 -04:00
parent f268857129
commit 46c8920020
No known key found for this signature in database
GPG Key ID: FD2C3C012A72926B

View File

@ -1205,7 +1205,7 @@ class ProjectAccess(BaseAccess):
def can_add(self, data):
if not data: # So the browseable API will work
return Organization.accessible_objects(self.user, 'admin_role').exists()
return (self.check_related('organization', Organization, data, mandatory=True) and
return (self.check_related('organization', Organization, data, role_field='project_admin_role', mandatory=True) and
self.check_related('credential', Credential, data, role_field='use_role'))
@check_superuser