mirror of
https://github.com/retspen/webvirtcloud
synced 2024-11-01 12:04:15 +00:00
27f62dff6c
- Manage users - Manage groups - Manage logs
10 lines
272 B
Python
10 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
|