Fix FLEXIAPI-411 Add a temporary toggle to hide the login page counter globally

This commit is contained in:
Timothée Jaussoin 2025-12-04 16:27:32 +01:00
parent ae4a651f2a
commit e0f33da4ac
4 changed files with 14 additions and 4 deletions

View file

@ -97,3 +97,5 @@ HCAPTCHA_SITEKEY=site-key
JWT_RSA_PUBLIC_KEY_PEM= JWT_RSA_PUBLIC_KEY_PEM=
JWT_SIP_IDENTIFIER= JWT_SIP_IDENTIFIER=
# Temporary toggles
APP_SHOW_LOGIN_COUNTER_TEMP= # default true

View file

@ -43,9 +43,9 @@ class AuthenticateController extends Controller
return redirect()->route('account.dashboard'); return redirect()->route('account.dashboard');
} }
return view('account.login', [ return view('account.login', config('app.show_login_counter_temp') ? [
'count' => Account::where('activated', true)->count() 'count' => Account::where('activated', true)->count()
]); ]: []);
} }
public function authenticate(Request $request) public function authenticate(Request $request)

View file

@ -37,6 +37,12 @@ return [
'recovery_code_expiration_minutes' => env('APP_RECOVERY_CODE_EXPIRATION_MINUTES', 10), 'recovery_code_expiration_minutes' => env('APP_RECOVERY_CODE_EXPIRATION_MINUTES', 10),
'provisioning_token_expiration_minutes' => env('APP_PROVISIONING_TOKEN_EXPIRATION_MINUTES', 0), 'provisioning_token_expiration_minutes' => env('APP_PROVISIONING_TOKEN_EXPIRATION_MINUTES', 0),
'reset_password_email_token_expiration_minutes' => env('APP_RESET_PASSWORD_EMAIL_TOKEN_EXPIRATION_MINUTES', 1440), 'reset_password_email_token_expiration_minutes' => env('APP_RESET_PASSWORD_EMAIL_TOKEN_EXPIRATION_MINUTES', 1440),
/**
* Temporary toggles
*/
'show_login_counter_temp' => env('APP_SHOW_LOGIN_COUNTER_TEMP', true),
/** /**
* Amount of minutes before re-authorizing the generation of a new account creation token * Amount of minutes before re-authorizing the generation of a new account creation token
*/ */

View file

@ -48,8 +48,10 @@
@endif @endif
</section> </section>
<section class="on_desktop" style="text-align: center;"> <section class="on_desktop" style="text-align: center;">
@if (isset($count))
<span style="color: var(--main-5); font-size: 5rem; font-weight: 300;">{{ $count }}</span><br /> <span style="color: var(--main-5); font-size: 5rem; font-weight: 300;">{{ $count }}</span><br />
<p style="margin-bottom: 3rem;">users</p> <p style="margin-bottom: 3rem;">users</p>
@endif
<img src="{{ asset('img/login.svg') }}"> <img src="{{ asset('img/login.svg') }}">
</section> </section>