Skip to content

Commit

Permalink
Update clean up extension and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-macdermaid committed Feb 6, 2021
1 parent ab42ad5 commit 59cf679
Show file tree
Hide file tree
Showing 3 changed files with 106 additions and 108 deletions.
12 changes: 0 additions & 12 deletions ckanext-datagov_inventory/ckanext/datagov_inventory/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,6 @@ def _wrapper(next_auth, context, dict_data=None):
return _wrapper


# group list is called on anonymous pages through package_show
# this prevents a 500, and instead returns our 403 error
# @toolkit.auth_allow_anonymous_access
# def group_list_authz(context, data_dict=None):
# log.info('Calling group list authz')
# user = context.get('user')
# if user:
# return authz.is_authorized('group_list', context, data_dict)
# else:
# toolkit.abort(status_code=403)
# return {'success': False, 'msg': default_message}

class Datagov_IauthfunctionsPlugin(plugins.SingletonPlugin):
plugins.implements(plugins.IAuthFunctions)
plugins.implements(plugins.IConfigurer)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<article class="module">
<div class="module-content">
<h2>You are not authorized to perform this action.</h2>
<p>If you a government user, you are either not allowed to perform this action or you need to {% link_for _('log in'), named_route='user.login' %}.</p>
<p>If you a government user, you are either not allowed to perform this action or you need to {% link_for _('Log in'), named_route='user.login' %}.</p>
<p>If you are looking for data please go to <a href='https://catalog.data.gov/dataset'>catalog.data.gov</a>.</p>
</div>
</article>
Expand Down
Loading

0 comments on commit 59cf679

Please sign in to comment.