Skip to content

Commit

Permalink
[#1210] Minor changes after review
Browse files Browse the repository at this point in the history
  • Loading branch information
amercader committed Aug 29, 2013
1 parent 1988837 commit be81ab9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ckan/logic/__init__.py
Expand Up @@ -213,9 +213,9 @@ def check_access(action, context, data_dict=None):

if not context.get('ignore_auth'):
if not context.get('__auth_user_obj_checked'):
context['__auth_user_obj_checked'] = True
if context.get('user') and not context.get('auth_user_obj'):
context['auth_user_obj'] = model.User.by_name(context['user'])
context['__auth_user_obj_checked'] = True

if action:
logic_authorization = new_authz.is_authorized(action, context, data_dict)
Expand Down Expand Up @@ -303,7 +303,7 @@ def get_action(action):
# being side-effect free.
if action_module_name == 'get' and \
not hasattr(v, 'side_effect_free'):
v.side_effect_free = True
v.side_effect_free = True


# Then overwrite them with any specific ones in the plugins:
Expand Down
2 changes: 1 addition & 1 deletion ckan/new_authz.py
Expand Up @@ -66,7 +66,7 @@ def _build(self):
if not hasattr(v, 'auth_allow_anonymous_access'):
if auth_module_name == 'get':
v.auth_allow_anonymous_access = True
elif auth_module_name in ['create', 'update', 'delete']:
else:
v.auth_allow_anonymous_access = False
self._functions[key] = v

Expand Down

0 comments on commit be81ab9

Please sign in to comment.