mirror of
https://github.com/eduardogsilva/routerfleet.git
synced 2025-07-14 12:14:23 +02:00
import user_manager and accounts from project wireguard_webadmin
This commit is contained in:
parent
757fa6a1e1
commit
c104a12df0
28 changed files with 618 additions and 4 deletions
21
user_manager/models.py
Normal file
21
user_manager/models.py
Normal file
|
@ -0,0 +1,21 @@
|
|||
from django.db import models
|
||||
from django.contrib.auth.models import User
|
||||
import uuid
|
||||
|
||||
|
||||
class UserAcl(models.Model):
|
||||
user = models.OneToOneField(User, on_delete=models.CASCADE)
|
||||
user_level = models.PositiveIntegerField(default=0, choices=(
|
||||
(10, 'Debugging Analyst'),
|
||||
(20, 'View Only User'),
|
||||
(30, 'Peer Manager'),
|
||||
(40, 'Manager'),
|
||||
(50, 'Administrator'),
|
||||
))
|
||||
|
||||
created = models.DateTimeField(auto_now_add=True)
|
||||
updated = models.DateTimeField(auto_now=True)
|
||||
uuid = models.UUIDField(primary_key=True, editable=False, default=uuid.uuid4)
|
||||
|
||||
def __str__(self):
|
||||
return self.user.username
|
Loading…
Add table
Add a link
Reference in a new issue