settings: Remove realm-level email_address_visibility setting.

This was replaced by the new user-level version in recent commits.

Fixes #20035.
Fixes #18149.
This commit is contained in:
Sahil Batra
2021-10-28 00:09:45 +05:30
committed by Tim Abbott
parent 1b110552ec
commit 9d1dc20e6e
24 changed files with 32 additions and 162 deletions

View File

@@ -449,26 +449,6 @@ class Realm(models.Model): # type: ignore[django-manager-missing] # django-stub
WILDCARD_MENTION_POLICY_MODERATORS,
]
# Who in the organization has access to users' actual email
# addresses. Controls whether the UserProfile.email field is the
# same as UserProfile.delivery_email, or is instead garbage.
EMAIL_ADDRESS_VISIBILITY_EVERYONE = 1
EMAIL_ADDRESS_VISIBILITY_MEMBERS = 2
EMAIL_ADDRESS_VISIBILITY_ADMINS = 3
EMAIL_ADDRESS_VISIBILITY_NOBODY = 4
EMAIL_ADDRESS_VISIBILITY_MODERATORS = 5
email_address_visibility = models.PositiveSmallIntegerField(
default=EMAIL_ADDRESS_VISIBILITY_EVERYONE,
)
EMAIL_ADDRESS_VISIBILITY_TYPES = [
EMAIL_ADDRESS_VISIBILITY_EVERYONE,
# The MEMBERS level is not yet implemented on the backend.
## EMAIL_ADDRESS_VISIBILITY_MEMBERS,
EMAIL_ADDRESS_VISIBILITY_ADMINS,
EMAIL_ADDRESS_VISIBILITY_NOBODY,
EMAIL_ADDRESS_VISIBILITY_MODERATORS,
]
# Threshold in days for new users to create streams, and potentially take
# some other actions.
waiting_period_threshold = models.PositiveIntegerField(default=0)
@@ -725,7 +705,6 @@ class Realm(models.Model): # type: ignore[django-manager-missing] # django-stub
digest_weekday=int,
disallow_disposable_email_addresses=bool,
edit_topic_policy=int,
email_address_visibility=int,
email_changes_disabled=bool,
emails_restricted_to_domains=bool,
enable_read_receipts=bool,