Skip to content

Commit

Permalink
[#2939] Logic validators use new sysadmin check
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed Oct 10, 2012
1 parent 08be7c6 commit 49f27ca
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ckan/logic/validators.py
Expand Up @@ -5,14 +5,14 @@
from pylons.i18n import _

from ckan.lib.navl.dictization_functions import Invalid, Missing, missing, unflatten
from ckan.authz import Authorizer
from ckan.logic import check_access, NotAuthorized
from ckan.lib.helpers import date_str_to_datetime
from ckan.model import (MAX_TAG_LENGTH, MIN_TAG_LENGTH,
PACKAGE_NAME_MIN_LENGTH, PACKAGE_NAME_MAX_LENGTH,
PACKAGE_VERSION_MAX_LENGTH,
VOCABULARY_NAME_MAX_LENGTH,
VOCABULARY_NAME_MIN_LENGTH)
import ckan.new_authz

def package_id_not_changed(value, context):

Expand Down Expand Up @@ -357,7 +357,7 @@ def ignore_not_package_admin(key, data, errors, context):
if 'ignore_auth' in context:
return

if user and Authorizer.is_sysadmin(user):
if user and ckan.new_authz.is_sysadmin(user):
return

authorized = False
Expand All @@ -384,7 +384,7 @@ def ignore_not_group_admin(key, data, errors, context):
model = context['model']
user = context.get('user')

if user and Authorizer.is_sysadmin(user):
if user and ckan.new_authz.is_sysadmin(user):
return

authorized = False
Expand Down

0 comments on commit 49f27ca

Please sign in to comment.