mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	org settings: Add button to deactivate organization.
This adds button under "Organization profile" settings, which deactivates the organization and sends an "event" to all the active user and log out them. Fixes: #8212.
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							2733c0551e
						
					
				
				
					commit
					9feae472f8
				
			@@ -607,6 +607,10 @@ def do_deactivate_realm(realm: Realm) -> None:
 | 
			
		||||
        # notice when they try to log in.
 | 
			
		||||
        delete_user_sessions(user)
 | 
			
		||||
 | 
			
		||||
    event = dict(type="realm", op="deactivated",
 | 
			
		||||
                 realm_id=realm.id)
 | 
			
		||||
    send_event(event, active_user_ids(realm.id))
 | 
			
		||||
 | 
			
		||||
def do_reactivate_realm(realm: Realm) -> None:
 | 
			
		||||
    realm.deactivated = False
 | 
			
		||||
    realm.save(update_fields=["deactivated"])
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user