SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit e5889ae0 authored by Jorran de Wit's avatar Jorran de Wit
Browse files

Fix too tight permissions; ambassadors have perm now

parent ff7f3362
No related branches found
No related tags found
No related merge requests found
......@@ -21,3 +21,11 @@ class PublicationLookup(LookupChannel):
return u"%s (%s)<br><span class='text-muted'>by %s</span>" % (item.title,
item.doi_string,
item.author_list)
def check_auth(self, request):
"""
Check if current user has required permissions.
Right now only used for draft registration invitations. May be extended in the
future for other purposes as well.
"""
return request.user.has_perm('can_draft_registration_invitations')
......@@ -20,3 +20,11 @@ class SubmissionLookup(LookupChannel):
def format_match(self, item):
'''(HTML) Format item for displaying in the dropdown.'''
return u"%s<br><span class='text-muted'>by %s</span>" % (item.title, item.author_list)
def check_auth(self, request):
"""
Check if current user has required permissions.
Right now only used for draft registration invitations. May be extended in the
future for other purposes as well.
"""
return request.user.has_perm('can_draft_registration_invitations')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment