From efcf46ce8a9d323f06ed0eedbb21913ea0d30927 Mon Sep 17 00:00:00 2001 From: miloschwartz Date: Thu, 22 Jan 2026 16:28:15 -0800 Subject: [PATCH] fix policy check on olm register --- server/routers/olm/handleOlmRegisterMessage.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/routers/olm/handleOlmRegisterMessage.ts b/server/routers/olm/handleOlmRegisterMessage.ts index b8d4dc01..db156c2c 100644 --- a/server/routers/olm/handleOlmRegisterMessage.ts +++ b/server/routers/olm/handleOlmRegisterMessage.ts @@ -149,7 +149,7 @@ export const handleOlmRegisterMessage: MessageHandler = async (context) => { return; } - if (!policyCheck.policies?.passwordAge?.compliant === false) { + if (policyCheck.policies?.passwordAge?.compliant === false) { logger.warn( `Olm user ${olm.userId} has non-compliant password age for org ${orgId}` ); @@ -159,7 +159,7 @@ export const handleOlmRegisterMessage: MessageHandler = async (context) => { ); return; } else if ( - !policyCheck.policies?.maxSessionLength?.compliant === false + policyCheck.policies?.maxSessionLength?.compliant === false ) { logger.warn( `Olm user ${olm.userId} has non-compliant session length for org ${orgId}`