2fa-0.5
This commit is contained in:
		
							parent
							
								
									a16cb64606
								
							
						
					
					
						commit
						7553c6a443
					
				
							
								
								
									
										5
									
								
								app.py
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								app.py
									
									
									
									
									
								
							| @ -676,7 +676,7 @@ def update_email_address(conf, username, old_email, new_email): | ||||
|         c.modify(user_dn, {'mail': [( MODIFY_REPLACE, new_email_addresses )]}) | ||||
|         newSession().set(get_user_data(user_dn, c)) | ||||
| 
 | ||||
| # ADD SECUREAUTH ATTRIBUTE - 2FA | ||||
| # ADD AUTHCODE ATTRIBUTE - 2FA | ||||
| def add_auth_attribute_step1(username, code): | ||||
|     changed = [] | ||||
| 
 | ||||
| @ -724,8 +724,7 @@ def add_auth_attribute_step3(conf, username, code): | ||||
| 
 | ||||
|     with connect_ldap(conf, user=superUser.admin_dn, password=superUser.admin_pwd) as c: | ||||
|         user_dn = find_user_dn(conf, c, username) | ||||
|         '''OBJECT_CLASS = ['top', 'inetOrgPerson', 'posixAccount', 'accountsManagement']''' | ||||
|         OBJECT_CLASS = ['accountsManagement']  | ||||
|         OBJECT_CLASS = ['top', 'inetOrgPerson', 'posixAccount', 'accountsManagement'] | ||||
|         c.add(dn=user_dn,object_class=OBJECT_CLASS, attributes={'authCode': code}) | ||||
|         newSession().set(get_user_data(user_dn, c)) | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user