Skip to content

Commit

Permalink
[#1060] Do not audit extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed Jul 2, 2013
1 parent 3e6e19a commit fb59183
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ckan/logic/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,9 @@ def get_action(action):
)
log.debug('Auth function %r was inserted', plugin.name)
resolved_action_plugins[name] = plugin.name
# Extensions are exempted from the auth audit for now
# This needs to be resolved later
auth_function.auth_audit_exempt = True
fetched_actions[name] = auth_function
# Use the updated ones in preference to the originals.
_actions.update(fetched_actions)
Expand Down Expand Up @@ -355,6 +358,8 @@ def wrapped(context=None, data_dict=None, **kw):
log.debug('No auth function for %s' % action_name)
elif not getattr(_action, 'auth_audit_exempt', False):
raise Exception('Action Auth Audit: %s' % action_name)
# remove from audit stack
context['__auth_audit'].pop()
except IndexError:
pass
return result
Expand Down

0 comments on commit fb59183

Please sign in to comment.