Skip to content

Commit

Permalink
Replace auth_function.__name__ with action
Browse files Browse the repository at this point in the history
  • Loading branch information
frafra authored and smotornyuk committed Jun 16, 2019
1 parent 6312b24 commit 6d1bfea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
9 changes: 5 additions & 4 deletions ckan/authz.py
Expand Up @@ -203,10 +203,11 @@ def is_authorized(action, context, data_dict=None):
# access straight away
if not getattr(auth_function, 'auth_allow_anonymous_access', False) \
and not context.get('auth_user_obj'):
return {'success': False,
'msg': '{0} requires an authenticated user'
.format(auth_function)
}
return {
'success': False,
'msg': 'Action {0} requires an authenticated user'.format(
action)
}

return auth_function(context, data_dict)
else:
Expand Down
4 changes: 0 additions & 4 deletions doc/maintaining/installing/install-from-docker-compose.rst
Expand Up @@ -173,11 +173,7 @@ a. Create and configure datastore database

With running CKAN containers, execute the built-in setup scripts against the ``db`` container::

<<<<<<< HEAD
docker exec -it db psql -U ckan -f 00_create_datastore.sql
=======
docker exec -it db sh /docker-entrypoint-initdb.d/00_create_datastore.sh
>>>>>>> 46eaff845... Obvious doc fix related with #3991
docker exec ckan /usr/local/bin/ckan-paster --plugin=ckan datastore set-permissions -c /etc/ckan/production.ini | docker exec -i db psql -U ckan

The first script will create the datastore database and the datastore readonly user in the ``db``
Expand Down

0 comments on commit 6d1bfea

Please sign in to comment.