From 9aa24638ee20a0bcf3cde477026a011ebaa86752 Mon Sep 17 00:00:00 2001 From: tobes Date: Fri, 12 Oct 2012 10:15:23 +0100 Subject: [PATCH] [#2939] remove check_access_old() function --- ckan/logic/__init__.py | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/ckan/logic/__init__.py b/ckan/logic/__init__.py index 9855a743c3e..85665b76f6d 100644 --- a/ckan/logic/__init__.py +++ b/ckan/logic/__init__.py @@ -217,28 +217,6 @@ def check_access(action, context, data_dict=None): return True -def check_access_old(entity, action, context): - model = context['model'] - user = context.get('user') - log.debug('check access - user %r, action %s' % (user, action)) - if action and entity and not isinstance(entity, model.PackageRelationship): - if action != model.Action.READ and user == '': - log.debug('Valid API key needed to make changes') - return False - #raise NotAuthorized - am_authz = ckan.authz.Authorizer().is_authorized(user, action, entity) - if not am_authz: - log.debug('User is not authorized to %s %s' % (action, entity)) - return False - #raise NotAuthorized - elif not user: - log.debug('No valid API key provided.') - return False - #raise NotAuthorized - - log.debug('Access OK.') - return True - _actions = {}