From 150147c69f3c134bc5c15df9897fa7f1cdbbd3f3 Mon Sep 17 00:00:00 2001 From: Skia Date: Wed, 20 Jul 2016 16:34:18 +0200 Subject: [PATCH] Fix the removing of built in permissions for admin app --- core/models.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/models.py b/core/models.py index aa59809c..003e3033 100644 --- a/core/models.py +++ b/core/models.py @@ -105,6 +105,12 @@ class User(AbstractBaseUser): USERNAME_FIELD = 'username' # REQUIRED_FIELDS = ['email'] + def has_module_perms(self, package_name): + return self.is_active + + def has_perm(self, perm, obj=None): + return self.is_active and self.is_superuser + def get_absolute_url(self): """ This is needed for black magic powered UpdateView's children