Adjustments for initial public launch of OpenCloud
diff --git a/planetstack/core/models/user.py b/planetstack/core/models/user.py
index 32f2078..a3b82d8 100644
--- a/planetstack/core/models/user.py
+++ b/planetstack/core/models/user.py
@@ -6,7 +6,6 @@
from django.contrib.auth.models import AbstractBaseUser, BaseUserManager
from timezones.fields import TimeZoneField
-
# Create your models here.
class UserManager(BaseUserManager):
def create_user(self, email, firstname, lastname, password=None):
@@ -70,6 +69,7 @@
is_active = models.BooleanField(default=True)
is_admin = models.BooleanField(default=True)
is_staff = models.BooleanField(default=True)
+ is_readonly = models.BooleanField(default=False)
created = models.DateTimeField(auto_now_add=True)
updated = models.DateTimeField(auto_now=True)
@@ -82,6 +82,9 @@
USERNAME_FIELD = 'email'
REQUIRED_FIELDS = ['firstname', 'lastname']
+ def isReadOnlyUser(self):
+ return self.is_readonly
+
def get_full_name(self):
# The user is identified by their email address
return self.email