Twig config improvements (#5923)

* deprecate direct kimai_config access, which was only used internally
* prevent access to system configs
* prevent access to most configs in sandbox environments
This commit is contained in:
Kevin Papst
2026-04-25 20:13:33 +02:00
committed by GitHub
parent 3eebb02ad3
commit 3b051e4aa5
11 changed files with 242 additions and 43 deletions

View File

@@ -48,12 +48,12 @@
{% block login_social_auth %}
{% if saml_config.isActivated() %}
{% if kimai_config.loginFormActive %}
{% if config('loginFormActive') %}
<div class="hr-text">{{ 'or'|trans({}, 'TablerBundle') }}</div>
{% endif %}
<div class="card-body">
<div class="row">
{% if not kimai_config.loginFormActive %}
{% if not config('loginFormActive') %}
<h2 class="card-title text-center mb-4">{{ block('login_box_msg') }}</h2>
{% endif %}
<div class="col text-center">
@@ -75,25 +75,25 @@
{% endblock %}
{% block login_box %}
{% if kimai_config.loginFormActive %}
{% if config('loginFormActive') %}
{{ parent() }}
{% endif %}
{% endblock %}
{% block login_form %}
{% if kimai_config.loginFormActive %}
{% if config('loginFormActive') %}
{{ parent() }}
{% endif %}
{% endblock %}
{% block password_forgotten %}
{% if kimai_config.passwordResetActive %}
{% if config('passwordResetActive') %}
{{ parent() }}
{% endif %}
{% endblock %}
{% block registration %}
{% if kimai_config.selfRegistrationActive %}
{% if config('selfRegistrationActive') %}
{{ parent() }}
{% endif %}
{% endblock %}