Skip to content

Commit

Permalink
[#2939] Auth create remove sysadmin references
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed Oct 3, 2012
1 parent d317b78 commit 1452f32
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions ckan/logic/auth/create.py
Expand Up @@ -32,9 +32,7 @@ def related_create(context, data_dict=None):
userobj = model.User.get( user )

if userobj:
if (data_dict.get('featured', 0) != 0 and
not Authorizer().is_sysadmin(unicode(user))):

if data_dict.get('featured', 0) != 0:
return {'success': False,
'msg': _('You must be a sysadmin to create a featured '
'related item')}
Expand Down Expand Up @@ -168,13 +166,13 @@ def group_create_rest(context, data_dict):
return group_create(context, data_dict)

def vocabulary_create(context, data_dict):
user = context['user']
return {'success': Authorizer.is_sysadmin(user)}
# sysadmins only
return {'success': False}

def activity_create(context, data_dict):
user = context['user']
return {'success': Authorizer.is_sysadmin(user)}
# sysadmins only
return {'success': False}

def tag_create(context, data_dict):
user = context['user']
return {'success': Authorizer.is_sysadmin(user)}
# sysadmins only
return {'success': False}

0 comments on commit 1452f32

Please sign in to comment.