Skip to content
Snippets Groups Projects
Commit 587424de authored by Gunnar Schaefer's avatar Gunnar Schaefer
Browse files

allow to inherit group perms on project creation

parent 70056eaf
No related branches found
No related tags found
No related merge requests found
......@@ -106,7 +106,10 @@ class Projects(containers.ContainerList):
if not self.superuser_request and util.user_perm(group['roles'], self.uid).get('access') != 'admin':
self.abort(400, 'must be group admin to create project')
json_body['group'] = gid
json_body['permissions'] = group['roles']
if self.request.GET.get('inherit', '').lower() in ('1', 'true'):
json_body['permissions'] = group['roles']
else:
json_body['permissions'] = [{'_id': self.uid, 'access': 'admin'}]
json_body['public'] = json_body.get('public', False)
json_body['files'] = []
json_body['timestamp'] = datetime.datetime.utcnow()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment