Skip to content

Commit

Permalink
[#2939] Improve has_user_permission_for_some_org()
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed Oct 10, 2012
1 parent 058d88d commit a5a5375
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ckan/new_authz.py
Expand Up @@ -99,6 +99,9 @@ def has_user_permission_for_some_org(user_id, permission):
if not user_id:
return False
roles = get_roles_with_permission(permission)

if not roles:
return False
# get any groups the user has with the needed role
q = model.Session.query(model.Member) \
.filter(model.Member.table_name == 'user') \
Expand Down

0 comments on commit a5a5375

Please sign in to comment.