Skip to content

Commit

Permalink
[#2939] Add new file_upload auth function
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed Oct 12, 2012
1 parent 5057ad9 commit 2e51b56
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ckan/logic/auth/create.py
Expand Up @@ -30,6 +30,12 @@ def package_create(context, data_dict=None):

return {'success': True}

def file_upload(context, data_dict=None):
user = context['user']
if not new_authz.auth_is_reqistered_user():
return {'success': False, 'msg': _('User %s not authorized to create packages') % user}
return {'success': True}

def related_create(context, data_dict=None):
'''Users must be logged-in to create related items.
Expand Down

0 comments on commit 2e51b56

Please sign in to comment.