mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-05 02:06:41 +00:00
fix org policy check
This commit is contained in:
@@ -125,10 +125,7 @@ export const handleOlmRegisterMessage: MessageHandler = async (context) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (!policyCheck.policies?.passwordAge?.compliant === false) {
|
||||||
policyCheck?.policies?.passwordAge &&
|
|
||||||
!policyCheck.policies.passwordAge.compliant
|
|
||||||
) {
|
|
||||||
logger.warn(
|
logger.warn(
|
||||||
`Olm user ${olm.userId} has non-compliant password age for org ${orgId}`
|
`Olm user ${olm.userId} has non-compliant password age for org ${orgId}`
|
||||||
);
|
);
|
||||||
@@ -138,8 +135,7 @@ export const handleOlmRegisterMessage: MessageHandler = async (context) => {
|
|||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
} else if (
|
} else if (
|
||||||
policyCheck?.policies?.maxSessionLength &&
|
!policyCheck.policies?.maxSessionLength?.compliant === false
|
||||||
!policyCheck.policies.maxSessionLength.compliant
|
|
||||||
) {
|
) {
|
||||||
logger.warn(
|
logger.warn(
|
||||||
`Olm user ${olm.userId} has non-compliant session length for org ${orgId}`
|
`Olm user ${olm.userId} has non-compliant session length for org ${orgId}`
|
||||||
@@ -149,10 +145,7 @@ export const handleOlmRegisterMessage: MessageHandler = async (context) => {
|
|||||||
olm.olmId
|
olm.olmId
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
} else if (
|
} else if (policyCheck.policies?.requiredTwoFactor === false) {
|
||||||
policyCheck?.policies &&
|
|
||||||
!policyCheck.policies.requiredTwoFactor
|
|
||||||
) {
|
|
||||||
logger.warn(
|
logger.warn(
|
||||||
`Olm user ${olm.userId} does not have 2FA enabled for org ${orgId}`
|
`Olm user ${olm.userId} does not have 2FA enabled for org ${orgId}`
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user