Skip to content

Commit

Permalink
[#2939] Package delete auth changes
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed Oct 9, 2012
1 parent 4252601 commit adca61b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ckan/logic/auth/delete.py
Expand Up @@ -6,11 +6,10 @@
from ckan.lib.base import _

def package_delete(context, data_dict):
model = context['model']
user = context['user']
package = get_package_object(context, data_dict)

authorized = logic.check_access_old(package, model.Action.PURGE, context)
authorized = new_authz.has_user_permission_for_group_or_org(package.owner_org, user, 'delete_dataset')
if not authorized:
return {'success': False, 'msg': _('User %s not authorized to delete package %s') % (str(user),package.id)}
else:
Expand Down

0 comments on commit adca61b

Please sign in to comment.