From ee65f70292ae80f1843a37aeaaeea1f3edb105a6 Mon Sep 17 00:00:00 2001 From: Sean Hammond Date: Tue, 4 Jun 2013 15:34:36 +0200 Subject: [PATCH] [#953] Allow anyone to read datasets with no org If a dataset has no owner organization, authorize anyone to read that dataset (regardless of whether it's public or private). --- ckan/logic/auth/get.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ckan/logic/auth/get.py b/ckan/logic/auth/get.py index 6d5799ef2fe..fc72b2d065f 100644 --- a/ckan/logic/auth/get.py +++ b/ckan/logic/auth/get.py @@ -100,6 +100,8 @@ def package_show(context, data_dict): auth = new_authz.is_authorized('package_update', context, data_dict) authorized = auth.get('success') + elif package.owner_org is None: + return {'success': True} else: # anyone can see a public package if not package.private and package.state == 'active':