mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	realm: Disable enable_spectator_access on changing to limited plan.
Since we not allow enabling public access on limited plan realms, we set the enable_spectator_access setting to False when downgrading to a limited plan. Setting is still shown in the UI but it is disabled.
This commit is contained in:
		@@ -166,6 +166,10 @@ def do_create_realm(
 | 
			
		||||
    if org_type is not None:
 | 
			
		||||
        kwargs["org_type"] = org_type
 | 
			
		||||
    if enable_spectator_access is not None:
 | 
			
		||||
        if enable_spectator_access:
 | 
			
		||||
            # Realms with LIMITED plan cannot have spectators enabled.
 | 
			
		||||
            assert plan_type != Realm.PLAN_TYPE_LIMITED
 | 
			
		||||
            assert plan_type is not None or not settings.BILLING_ENABLED
 | 
			
		||||
        kwargs["enable_spectator_access"] = enable_spectator_access
 | 
			
		||||
 | 
			
		||||
    if date_created is not None:
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user