Skip to content

Commit

Permalink
[#2939] Package show auth minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed Oct 14, 2012
1 parent 95fe7d0 commit 43e95d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ckan/logic/auth/get.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ def package_relationships_list(context, data_dict):
return {'success': True}

def package_show(context, data_dict):
user = context.get('user')
package = get_package_object(context, data_dict)
# draft state indicates package is still in the creation process
# so we need to check we have creation rights.
Expand All @@ -103,7 +104,6 @@ def package_show(context, data_dict):
# anyone can see a public package
if not package.private and package.state == 'active':
return {'success': True}
user = context.get('user')
authorized = new_authz.has_user_permission_for_group_or_org(
package.owner_org, user, 'read')
if not authorized:
Expand Down

0 comments on commit 43e95d6

Please sign in to comment.