From bccae61341ba8b889c1ba902d94ec0e9ac958951 Mon Sep 17 00:00:00 2001 From: tobes Date: Wed, 10 Oct 2012 12:25:08 +0100 Subject: [PATCH] [#2939] Auth create user_create() changes --- ckan/logic/auth/create.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ckan/logic/auth/create.py b/ckan/logic/auth/create.py index af9bb924132..3270db97d65 100644 --- a/ckan/logic/auth/create.py +++ b/ckan/logic/auth/create.py @@ -90,12 +90,10 @@ def rating_create(context, data_dict): return {'success': True} def user_create(context, data_dict=None): - model = context['model'] user = context['user'] - authorized = logic.check_access_old(model.System(), model.Action.USER_CREATE, context) - if not authorized: - return {'success': False, 'msg': _('User %s not authorized to create users') % str(user)} + if not asbool(config.get('ckan.auth.create_user', True)): + return {'success': False, 'msg': _('User %s not authorized to create users') % user} else: return {'success': True}