This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
2018-11-16 12:08:37 +00:00
|
|
|
"""passbook admin mixins"""
|
2018-11-16 08:10:35 +00:00
|
|
|
from django.contrib.auth.mixins import UserPassesTestMixin
|
|
|
|
|
|
|
|
|
|
|
|
class AdminRequiredMixin(UserPassesTestMixin):
|
|
|
|
"""Make sure user is administrator"""
|
|
|
|
|
|
|
|
def test_func(self):
|
|
|
|
return self.request.user.is_superuser
|