mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	create_user: Specify tos_version=None explicitly in automation.
This is an important design detail, so we document this aspect of creating users via both the management command and API code paths with an explicit parameter value and comment.
This commit is contained in:
		@@ -641,7 +641,18 @@ def create_user_backend(
 | 
			
		||||
    if not check_password_strength(password):
 | 
			
		||||
        raise JsonableError(PASSWORD_TOO_WEAK_ERROR)
 | 
			
		||||
 | 
			
		||||
    target_user = do_create_user(email, password, realm, full_name, acting_user=user_profile)
 | 
			
		||||
    target_user = do_create_user(
 | 
			
		||||
        email,
 | 
			
		||||
        password,
 | 
			
		||||
        realm,
 | 
			
		||||
        full_name,
 | 
			
		||||
        # Explicitly set tos_version=None. For servers that have
 | 
			
		||||
        # configured Terms of Service, this means that users created
 | 
			
		||||
        # via this mechanism will be prompted to accept the Terms of
 | 
			
		||||
        # Service on first login.
 | 
			
		||||
        tos_version=None,
 | 
			
		||||
        acting_user=user_profile,
 | 
			
		||||
    )
 | 
			
		||||
    return json_success(request, data={"user_id": target_user.id})
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user