Skip to content

Commit

Permalink
[#2939] If no group the assume permission ok
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed Oct 14, 2012
1 parent 68a3d73 commit 1820a02
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ckan/new_authz.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ def get_roles_with_permission(permission):

def has_user_permission_for_group_or_org(group_id, user_name, permission):
''' Check if the user has the given permission for the group '''
if not group_id:
return True
user_id = get_user_id_for_username(user_name, allow_none=True)
if not user_id:
return False
Expand Down

0 comments on commit 1820a02

Please sign in to comment.