Merge pull request #904 from alligatorbait/master

Allow users to edit tickets if HELPDESK_ALLOW_NON_STAFF_TICKET_UPDATE enabled
This commit is contained in:
Garret Wassermann 2020-11-12 23:56:34 -05:00 committed by GitHub
commit cad87b90b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,7 +54,8 @@ class HelpdeskUser:
return Ticket.objects.filter(queue__in=self.get_queues())
def has_full_access(self):
return self.user.is_superuser or self.user.is_staff
return self.user.is_superuser or self.user.is_staff \
or helpdesk_settings.HELPDESK_ALLOW_NON_STAFF_TICKET_UPDATE
def can_access_queue(self, queue):
"""Check if a certain user can access a certain queue.