From 7553c6a443da98a2e8e573f45ba934aca4fe3eab Mon Sep 17 00:00:00 2001 From: Aitzol Date: Thu, 16 Nov 2023 13:21:09 +0100 Subject: [PATCH] 2fa-0.5 --- app.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app.py b/app.py index fb5383e..9633a50 100644 --- a/app.py +++ b/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))