Skip to content

Commit

Permalink
test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
smotornyuk authored and amercader committed Jun 21, 2017
1 parent 3f162b8 commit 7261336
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 19 deletions.
4 changes: 2 additions & 2 deletions ckan/controllers/group.py
Expand Up @@ -405,7 +405,7 @@ def bulk_process(self, id):
data_dict = {'id': id}

try:
self._check_access('bulk_update_public', context, data_dict)
self._check_access('bulk_update_public', context, {'org_id': id})
# Do not query for the group datasets when dictizing, as they will
# be ignored and get requested on the controller anyway
data_dict['include_datasets'] = False
Expand Down Expand Up @@ -675,7 +675,7 @@ def members(self, id):

try:
data_dict = {'id': id}
self._check_access('group_edit_permissions', context, data_dict)
check_access('group_edit_permissions', context, data_dict)
c.members = self._action('member_list')(
context, {'id': id, 'object_type': 'user'}
)
Expand Down
17 changes: 0 additions & 17 deletions ckan/logic/auth/update.py
Expand Up @@ -186,23 +186,6 @@ def group_edit_permissions(context, data_dict):
return {'success': True}


def organization_edit_permissions(context, data_dict):
user = context['user']
group = logic_auth.get_group_object(context, data_dict)

authorized = authz.has_user_permission_for_group_or_org(
group.id, user, 'update')

if not authorized:
return {
'success': False,
'msg': _('User %s not authorized to edit'
' permissions of organization %s') %
(str(user), group.id)}
else:
return {'success': True}


@logic.auth_allow_anonymous_access
def user_update(context, data_dict):
user = context['user']
Expand Down

0 comments on commit 7261336

Please sign in to comment.