mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-01-15 05:33:26 +01:00
11 lines
294 B
Python
11 lines
294 B
Python
from rest_framework.permissions import BasePermission
|
|
from django.conf import settings
|
|
|
|
|
|
class NotInDemoMode(BasePermission):
|
|
def has_permission(self, request, view):
|
|
if settings.DEMO and not request.user.is_superuser:
|
|
return False
|
|
else:
|
|
return True
|