mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-11 04:19:25 +00:00
Allow root to reset user password
This commit is contained in:
@ -223,6 +223,9 @@ class User(AbstractBaseUser):
|
||||
return True
|
||||
return self.groups.filter(name=group_name).exists()
|
||||
|
||||
def is_root(self):
|
||||
return self.is_superuser or self.groups.filter(name=settings.SITH_GROUPS['root']['name']).exists()
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
with transaction.atomic():
|
||||
if self.id:
|
||||
|
Reference in New Issue
Block a user