externalldap: when using cloudron source, disable local 2fa setup

This commit is contained in:
Girish Ramakrishnan
2024-01-20 11:35:27 +01:00
parent c99c24b3bd
commit 13b9bed48b
11 changed files with 42 additions and 27 deletions
+2 -2
View File
@@ -136,9 +136,9 @@ describe('Directory Server (LDAP)', function () {
});
it('enable 2fa', async function () {
twofa = await users.setTwoFactorAuthenticationSecret(admin.id, auditSource);
twofa = await users.setTwoFactorAuthenticationSecret(admin, auditSource);
const totpToken = speakeasy.totp({ secret: twofa.secret, encoding: 'base32' });
await users.enableTwoFactorAuthentication(admin.id, totpToken, auditSource);
await users.enableTwoFactorAuthentication(await users.get(admin.id), totpToken, auditSource);
});
it('fails with empty 2fa', async function () {