mirror of
https://github.com/retspen/webvirtcloud.git
synced 2026-05-26 15:13:33 +00:00
11 lines
272 B
Python
11 lines
272 B
Python
from django.core.exceptions import PermissionDenied
|
|
|
|
|
|
def superuser_only(function):
|
|
def _inner(request, *args, **kwargs):
|
|
if not request.user.is_superuser:
|
|
raise PermissionDenied
|
|
return function(request, *args, **kwargs)
|
|
|
|
return _inner
|