Skip to content

Commit

Permalink
[#2939] Switch to you sysadmin model for plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed Oct 10, 2012
1 parent a0376ce commit 6412b61
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ckan/lib/plugins.py
Expand Up @@ -3,10 +3,10 @@
from pylons import c
from ckan.lib import base
from ckan.lib.navl import dictization_functions
from ckan import authz
from ckan import logic
import logic.schema
from ckan import plugins
import ckan.new_authz

log = logging.getLogger(__name__)

Expand Down Expand Up @@ -281,7 +281,7 @@ def setup_template_variables(self, context, data_dict):
c.groups_available = authz_fn(context, data_dict)

c.licences = [('', '')] + base.model.Package.get_license_options()
c.is_sysadmin = authz.Authorizer().is_sysadmin(c.user)
c.is_sysadmin = ckan.new_authz.is_sysadmin(c.user)

if c.pkg:
c.related_count = c.pkg.related_count
Expand Down Expand Up @@ -423,7 +423,7 @@ def check_data_dict(self, data_dict):
pass

def setup_template_variables(self, context, data_dict):
c.is_sysadmin = authz.Authorizer().is_sysadmin(c.user)
c.is_sysadmin = ckan.new_authz.is_sysadmin(c.user)

## This is messy as auths take domain object not data_dict
context_group = context.get('group', None)
Expand Down

0 comments on commit 6412b61

Please sign in to comment.