Change validators to use the validator_context
Change InstanceKeys to take a namedtuple for context
This commit is contained in:
		
							parent
							
								
									e967fde3ae
								
							
						
					
					
						commit
						554d4f47a8
					
				
					 31 changed files with 172 additions and 69 deletions
				
			
		|  | @ -11,8 +11,11 @@ class LDAPValidator(BaseValidator): | |||
|   name = "ldap" | ||||
| 
 | ||||
|   @classmethod | ||||
|   def validate(cls, config, user, user_password, app): | ||||
|   def validate(cls, validator_context): | ||||
|     """ Validates the LDAP connection. """ | ||||
|     config = validator_context.config | ||||
|     user = validator_context.user | ||||
|     user_password = validator_context.user_password | ||||
|     if config.get('AUTHENTICATION_TYPE', 'Database') != 'LDAP': | ||||
|       return | ||||
| 
 | ||||
|  |  | |||
		Reference in a new issue