mirror of
https://github.com/ae-utbm/sith.git
synced 2026-10-30 22:29:32 +00:00
Allow root to reset user password
This commit is contained in:
1 parent
a033c4dfd2
commit
792563999b
7 files changed
+265
-195
No files matched your search
@@ -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