mirror of
https://github.com/zulip/zulip.git
synced 2025-10-24 08:33:43 +00:00
users: Set tos_version to -1 for users who have not logged-in yet.
We now set tos_version to "-1" for imported users and the ones created using API or using other methods like LDAP, SCIM and management commands. This value will help us to allow users to change email address visibility setting during first login.
This commit is contained in:
@@ -1814,6 +1814,13 @@ class UserProfile(AbstractBaseUser, PermissionsMixin, UserBaseSettings): # type
|
||||
full_name = models.CharField(max_length=MAX_NAME_LENGTH)
|
||||
|
||||
date_joined = models.DateTimeField(default=timezone_now)
|
||||
|
||||
# Terms of Service version number that this user has accepted. We
|
||||
# use the special value TOS_VERSION_BEFORE_FIRST_LOGIN for users
|
||||
# whose account was created without direct user interaction (via
|
||||
# the API or a data import), and null for users whose account is
|
||||
# fully created on servers that do not have a configured ToS.
|
||||
TOS_VERSION_BEFORE_FIRST_LOGIN = "-1"
|
||||
tos_version = models.CharField(null=True, max_length=10)
|
||||
api_key = models.CharField(max_length=API_KEY_LENGTH)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user