From fb59183ca47fe4ec1cc11db78658c836838b6348 Mon Sep 17 00:00:00 2001 From: tobes Date: Tue, 2 Jul 2013 10:48:56 +0100 Subject: [PATCH] [#1060] Do not audit extensions --- ckan/logic/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ckan/logic/__init__.py b/ckan/logic/__init__.py index 1f6ec634fd6..4d8d6beb82c 100644 --- a/ckan/logic/__init__.py +++ b/ckan/logic/__init__.py @@ -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) @@ -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