mirror of
https://github.com/retspen/webvirtcloud
synced 2025-07-31 12:41:08 +00:00
Added admin application
- Manage users - Manage groups - Manage logs
This commit is contained in:
parent
38befa4362
commit
27f62dff6c
38 changed files with 933 additions and 742 deletions
10
admin/decorators.py
Normal file
10
admin/decorators.py
Normal file
|
@ -0,0 +1,10 @@
|
|||
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
|
Loading…
Add table
Add a link
Reference in a new issue