Skip to content

Commit

Permalink
Merge pull request #811 from okfn/811-remove-auth-profile-config
Browse files Browse the repository at this point in the history
Authz some old code survived
  • Loading branch information
vitorbaptista committed Apr 24, 2013
2 parents 425133e + 99a5e49 commit 8d51a5a
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions ckan/new_authz.py
Expand Up @@ -208,8 +208,7 @@ def get_user_id_for_username(user_name, allow_none=False):
return None
raise Exception('Not logged in user')

def _get_auth_function(action, profile=None):
from pylons import config
def _get_auth_function(action):

if action in AuthFunctions._functions:
return AuthFunctions._functions.get(action)
Expand All @@ -220,17 +219,7 @@ def _get_auth_function(action, profile=None):
# to load anything from ckan.auth that looks like it might
# be an authorisation function

# We will load the auth profile from settings
module_root = 'ckan.logic.auth'
if profile is not None:
auth_profile = profile
else:
auth_profile = config.get('ckan.auth.profile', '')

if auth_profile:
module_root = '%s.%s' % (module_root, auth_profile)

log.debug('Using auth profile at %s' % module_root)

for auth_module_name in ['get', 'create', 'update','delete']:
module_path = '%s.%s' % (module_root, auth_module_name,)
Expand Down

0 comments on commit 8d51a5a

Please sign in to comment.