Forgot to use a different user specific query.

This commit is contained in:
yackob03 2014-01-20 19:07:06 -05:00
parent 330051f7d9
commit 661179eaca

View file

@ -773,8 +773,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):