Skip to content

Commit

Permalink
Merge branch 'feature-1669-publisher-profile' into feature-1607-dgu-m…
Browse files Browse the repository at this point in the history
…aintentance-refactor
  • Loading branch information
Ian Murray committed Feb 13, 2012
2 parents a900ecb + d3cd286 commit 2a71ef5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ckan/logic/auth/publisher/get.py
Expand Up @@ -67,6 +67,9 @@ def package_show(context, data_dict):
package = get_package_object(context, data_dict)

if package.state == 'deleted':
if 'ignore_auth' in context and context['ignore_auth']:
return {'success': True}

user = context.get('user')

if not user:
Expand Down
3 changes: 3 additions & 0 deletions ckan/logic/auth/publisher/update.py
Expand Up @@ -13,6 +13,9 @@ def package_update(context, data_dict):
user = context.get('user')
package = get_package_object(context, data_dict)

if Authorizer().is_sysadmin(unicode(user)):
return { 'success': True }

userobj = model.User.get( user )
if not userobj or \
not _groups_intersect( userobj.get_groups('publisher'), package.get_groups('publisher') ):
Expand Down

0 comments on commit 2a71ef5

Please sign in to comment.