Skip to content

Commit 32fb8ec

Browse files
authoredNov 11, 2024··
Merge pull request #483 from vrk-kpa/fix_dataset_show
Fix dataset show for anonymous users
2 parents 93d9ca7 + 477dd16 commit 32fb8ec

File tree

1 file changed

+3
-1
lines changed
  • ckanext/ckanext-apicatalog/ckanext/apicatalog

1 file changed

+3
-1
lines changed
 

‎ckanext/ckanext-apicatalog/ckanext/apicatalog/plugin.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,9 @@ def after_dataset_show(self, context, data_dict):
924924
return data_dict
925925

926926
# Skip access check if sysadmin or auth is ignored
927-
if context.get('ignore_auth') or (context.get('auth_user_obj') and context.get('auth_user_obj').sysadmin):
927+
if context.get('ignore_auth') or (context.get('auth_user_obj')
928+
and not context.get('auth_user_obj').is_anonymous
929+
and context.get('auth_user_obj').sysadmin):
928930
return data_dict
929931

930932
user_name = context.get('user')

0 commit comments

Comments
 (0)
Please sign in to comment.