Skip to content

Commit

Permalink
[#2939] Auth update group_edit_permissions() changes
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed Oct 10, 2012
1 parent a631436 commit 75323df
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions ckan/logic/auth/update.py
Expand Up @@ -115,12 +115,10 @@ def group_change_state(context, data_dict):
return {'success': True}

def group_edit_permissions(context, data_dict):
model = context['model']
user = context['user']
group = get_group_object(context, data_dict)

authorized = logic.check_access_old(group, model.Action.EDIT_PERMISSIONS, context)
if not authorized:
if not new_authz.has_user_permission_for_group_or_org(group.id, user, 'update'):
return {'success': False, 'msg': _('User %s not authorized to edit permissions of group %s') % (str(user),group.id)}
else:
return {'success': True}
Expand Down

0 comments on commit 75323df

Please sign in to comment.