mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	Disable signups for realms that exist as part of enterprise deployments.
(imported from commit 4200b44c7153d1dba674982916ef0470c75bdf6d)
This commit is contained in:
		@@ -22,7 +22,13 @@ def is_inactive(value):
 | 
				
			|||||||
SIGNUP_STRING = '<a href="https://zulip.com/signup">Sign up</a> to find out when Zulip is ready for you.'
 | 
					SIGNUP_STRING = '<a href="https://zulip.com/signup">Sign up</a> to find out when Zulip is ready for you.'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def has_valid_realm(value):
 | 
					def has_valid_realm(value):
 | 
				
			||||||
    return Realm.objects.filter(domain=email_to_domain(value)).exists()
 | 
					    try:
 | 
				
			||||||
 | 
					        realm = Realm.objects.get(domain=email_to_domain(value))
 | 
				
			||||||
 | 
					    except Realm.DoesNotExist:
 | 
				
			||||||
 | 
					        return False
 | 
				
			||||||
 | 
					    if settings.ENTERPRISE:
 | 
				
			||||||
 | 
					        return True
 | 
				
			||||||
 | 
					    return realm.deployment.name in ["mit.edu", "zulip.com"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def not_mit_mailing_list(value):
 | 
					def not_mit_mailing_list(value):
 | 
				
			||||||
    # I don't want ec-discuss signed up for Zulip
 | 
					    # I don't want ec-discuss signed up for Zulip
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user