We use MantiBT 2.26.x with an AD/LDAP directory service at a large corporation.
When the user changes the password in AD/LDAP, in the Service Center, because he has forgotten it, the account is already blocked by the limit "$g_max_failed_login_count = 3;" on MantisBT.
I understand that this limit may apply well to users on the local MantisBT base and not with a central directory service, where the account must be blocked by (n) attempts in AD/LDAP.
We do not use local users on MantisBT and this creates a huge demand for administrators to perform the unlock manually.
I carried out an assessment and implemented a solution so that access with valid authentication in the central AD/LDAP does not block the user in MantisBT.
It worked adequately for me. If you have another solution to not block valid AD/LDAP users on Mantis (keeping the parameter $g_max_failed_login_count = 3 for local users). Thanks for the tip on an alternative solution.
Here my implementation:
config_defaults_inc.php <-- product default with parameter included.
/**
* LDAP failed login no locked
*
* Allows access when login is successful in LDAP
* - When OFF (default), keeps users locked in MantisBT
* - When enabled, resets login failure count to zero, upon successful LDAP login, user account not locked in MantisBT
*
* @global integer $g_ldap_failed_login_no_locked
*/
$g_ldap_failed_login_no_locked = OFF;
config/config_inc.php <-- Our default with parameter included.
/**
* LDAP failed login no locked
*
* Allows access when login is successful in LDAP
* - When OFF (default), keeps users locked in MantisBT
* - When enabled, resets login failure count to zero, upon successful LDAP login, user account not locked in MantisBT
$g_ldap_failed_login_no_locked = ON;
diff /var/www/html/mantisbt/core/authentication_api.php ../mantisbt-2.26.1/core/authentication_api.php
509,512c509,510
< if (( config_get_global( 'login_method' ) != LDAP ) || ( config_get_global( 'ldap_failed_login_no_locked' ) != 1 )) {
< if( !user_is_login_request_allowed( $t_user_id ) ) {
< return false;
< }
---
> if( !user_is_login_request_allowed( $t_user_id ) ) {
> return false;
--
thanks