Merge branch 'umask' of https://bitbucket.org/yackob03/quay into umask

This commit is contained in:
Joseph Schorr 2014-01-21 14:18:29 -05:00
commit e8d51b651f

View file

@ -820,8 +820,13 @@ def create_repository(namespace, name, creating_user, visibility='private'):
for team, role in final_protos.values():
RepositoryPermission.create(team=team, repository=repo, role=role)
user_protos = (PermissionPrototype
.select()
.where(PermissionPrototype.org == org, user_clause,
PermissionPrototype.delegate_team >> None))
final_user_protos = {}
for proto in team_protos:
for proto in user_protos:
# We will skip the proto if it is pre-empted by a more important proto
if (proto.delegate_user.username in final_user_protos and
proto.activating_user is None):