mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 13:33:24 +00:00 
			
		
		
		
	auth: Rewrite data model for tracking enabled auth backends.
So far, we've used the BitField .authentication_methods on Realm for tracking which backends are enabled for an organization. This however made it a pain to add new backends (requiring altering the column and a migration - particularly troublesome if someone wanted to create their own custom auth backend for their server). Instead this will be tracked through the existence of the appropriate rows in the RealmAuthenticationMethods table.
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							41f17bf392
						
					
				
				
					commit
					ffa3aa8487
				
			@@ -248,7 +248,7 @@ class HomeTest(ZulipTestCase):
 | 
			
		||||
 | 
			
		||||
        # Verify succeeds once logged-in
 | 
			
		||||
        flush_per_request_caches()
 | 
			
		||||
        with self.assert_database_query_count(47):
 | 
			
		||||
        with self.assert_database_query_count(51):
 | 
			
		||||
            with patch("zerver.lib.cache.cache_set") as cache_mock:
 | 
			
		||||
                result = self._get_home_page(stream="Denmark")
 | 
			
		||||
                self.check_rendered_logged_in_app(result)
 | 
			
		||||
@@ -439,7 +439,7 @@ class HomeTest(ZulipTestCase):
 | 
			
		||||
        # Verify number of queries for Realm admin isn't much higher than for normal users.
 | 
			
		||||
        self.login("iago")
 | 
			
		||||
        flush_per_request_caches()
 | 
			
		||||
        with self.assert_database_query_count(44):
 | 
			
		||||
        with self.assert_database_query_count(48):
 | 
			
		||||
            with patch("zerver.lib.cache.cache_set") as cache_mock:
 | 
			
		||||
                result = self._get_home_page()
 | 
			
		||||
                self.check_rendered_logged_in_app(result)
 | 
			
		||||
@@ -471,7 +471,7 @@ class HomeTest(ZulipTestCase):
 | 
			
		||||
 | 
			
		||||
        # Then for the second page load, measure the number of queries.
 | 
			
		||||
        flush_per_request_caches()
 | 
			
		||||
        with self.assert_database_query_count(42):
 | 
			
		||||
        with self.assert_database_query_count(46):
 | 
			
		||||
            result = self._get_home_page()
 | 
			
		||||
 | 
			
		||||
        # Do a sanity check that our new streams were in the payload.
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user