django-helpdesk/helpdesk/views/permissions.py
Martin Whitehouse 25542f929e
Initial isort configuration
Will fail build if imports are not sorted correctly
2022-07-22 03:26:41 +02:00

8 lines
273 B
Python

from django.contrib.auth.mixins import LoginRequiredMixin, UserPassesTestMixin
from helpdesk.decorators import is_helpdesk_staff
class MustBeStaffMixin(LoginRequiredMixin, UserPassesTestMixin):
def test_func(self):
return is_helpdesk_staff(self.request.user)