Add is_staff setter method for CustomUser
This commit is contained in:
parent
6a9232851a
commit
5e68fec29e
1 changed files with 4 additions and 0 deletions
|
@ -179,6 +179,10 @@ class CustomUser(AbstractBaseUser, PermissionsMixin):
|
|||
# Simplest possible answer: All admins are staff
|
||||
return self.is_admin
|
||||
|
||||
@is_staff.setter
|
||||
def is_staff(self, value):
|
||||
self._is_staff = value
|
||||
|
||||
|
||||
class StripeCustomer(models.Model):
|
||||
user = models.OneToOneField(CustomUser)
|
||||
|
|
Loading…
Reference in a new issue