Allow root to reset user password

This commit is contained in:
Skia committed 2016-08-13 17:15:45 +02:00
1 parent a033c4dfd2
commit 792563999b
7 files changed
+265 -195

No files matched your search

+3
View File
@@ -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: