mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	authenticate: Remove default values for required parameters.
It is now the caller’s responsibility to check that realm is not None. Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							725582850f
						
					
				
				
					commit
					082f23a659
				
			@@ -261,12 +261,11 @@ def remote_user_sso(request: HttpRequest,
 | 
			
		||||
 | 
			
		||||
    subdomain = get_subdomain(request)
 | 
			
		||||
    try:
 | 
			
		||||
        realm = get_realm(subdomain)  # type: Optional[Realm]
 | 
			
		||||
        realm = get_realm(subdomain)
 | 
			
		||||
    except Realm.DoesNotExist:
 | 
			
		||||
        realm = None
 | 
			
		||||
    # Since RemoteUserBackend will return None if Realm is None, we
 | 
			
		||||
    # don't need to check whether `realm` is None.
 | 
			
		||||
    user_profile = authenticate(remote_user=remote_user, realm=realm)
 | 
			
		||||
        user_profile = None
 | 
			
		||||
    else:
 | 
			
		||||
        user_profile = authenticate(remote_user=remote_user, realm=realm)
 | 
			
		||||
 | 
			
		||||
    redirect_to = request.GET.get('next', '')
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user