SciPost Code Repository

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

Merge branch 'hotfixpermissions'

parents ff7f3362 e5889ae0
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