Skip to content

Commit

Permalink
Disable the duration incremental factor
Browse files Browse the repository at this point in the history
  • Loading branch information
sandushi committed Oct 16, 2024
1 parent 0d02978 commit 13ccd20
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export const LoginAttemptSecurityConfigurationFrom: FunctionComponent<
const [ lockDuration, setLockDuration ] = useState<string>(undefined);
const [ lockIncrementRatio, setLockIncrementRatio ] = useState<string>(undefined);
const [ notifyUserOnAccountLockIncrement, setNotifyUserOnAccountLockIncrement ] = useState<boolean>(undefined);
const [ enableIndefiniteUserLockduration, setenableIndefiniteUserLockduration ] = useState<boolean>(undefined);
const [ enableIndefiniteUserLockduration, setEnableIndefiniteUserLockduration ] = useState<boolean>(undefined);
const [ accordionActiveIndex, setAccordionActiveIndex ] = useState<string | number>(undefined);

/**
Expand Down Expand Up @@ -174,7 +174,7 @@ export const LoginAttemptSecurityConfigurationFrom: FunctionComponent<
accountLockTime: property.value
};
setLockDuration(property.value);
setenableIndefiniteUserLockduration(parseInt(property.value) === 0);
setEnableIndefiniteUserLockduration(parseInt(property.value) === 0);
} else if (property.name === ServerConfigurationsConstants.ACCOUNT_LOCK_TIME_INCREMENT_FACTOR) {
resolvedInitialValues = {
...resolvedInitialValues,
Expand Down Expand Up @@ -329,7 +329,7 @@ export const LoginAttemptSecurityConfigurationFrom: FunctionComponent<
};

const updateEnableIndefiniteAccountLockDuration = (value: any) => {
setenableIndefiniteUserLockduration(value);
setEnableIndefiniteUserLockduration(value);
setLockDuration("0");
};

Expand Down Expand Up @@ -573,7 +573,7 @@ export const LoginAttemptSecurityConfigurationFrom: FunctionComponent<
.ACCOUNT_LOCK_INCREMENT_FACTOR_MIN_LENGTH
}
width={ 10 }
disabled={ !isConnectorEnabled }
disabled={ !isConnectorEnabled || enableIndefiniteUserLockduration }
data-testid={ `${testId}-account-lock-increment` }
readOnly={ readOnly }
/>
Expand Down

0 comments on commit 13ccd20

Please sign in to comment.