From 58412ff6b32cc662402dc907c841265814b12a07 Mon Sep 17 00:00:00 2001 From: yackob03 Date: Tue, 21 Jan 2014 17:18:12 -0500 Subject: [PATCH] Fix some problems with the permission prototype application on repository create. --- data/model.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/model.py b/data/model.py index 138df3fcd..c72e4c047 100644 --- a/data/model.py +++ b/data/model.py @@ -788,7 +788,7 @@ def __apply_default_permissions(repo, proto_query, name_property, create_permission_func): final_protos = {} for proto in proto_query: - applies_to = proto_query.delegate_team or proto_query.delegate_user + applies_to = proto.delegate_team or proto.delegate_user name = getattr(applies_to, name_property) # We will skip the proto if it is pre-empted by a more important proto if name in final_protos and proto.activating_user is None: @@ -816,7 +816,7 @@ def create_repository(namespace, name, creating_user, visibility='private'): # Permission prototypes only work for orgs org = get_organization(namespace) user_clause = (PermissionPrototype.activating_user == creating_user | - PermissionPrototype >> None) + PermissionPrototype.activating_user >> None) team_protos = (PermissionPrototype .select()