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))