[Web] Disable SSO button when admin login is disabled, fixes #4297
This commit is contained in:
parent
c0011013b8
commit
f01de1a5c0
@ -44,6 +44,7 @@ $globalVariables = [
|
|||||||
'available_languages' => $AVAILABLE_LANGUAGES,
|
'available_languages' => $AVAILABLE_LANGUAGES,
|
||||||
'lang' => $lang,
|
'lang' => $lang,
|
||||||
'skip_sogo' => (getenv('SKIP_SOGO') == 'y'),
|
'skip_sogo' => (getenv('SKIP_SOGO') == 'y'),
|
||||||
|
'allow_admin_email_login' => (getenv('ALLOW_ADMIN_EMAIL_LOGIN') == 'n'),
|
||||||
'mailcow_apps' => $MAILCOW_APPS,
|
'mailcow_apps' => $MAILCOW_APPS,
|
||||||
'app_links' => customize('get', 'app_links'),
|
'app_links' => customize('get', 'app_links'),
|
||||||
'is_root_uri' => (parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) == '/'),
|
'is_root_uri' => (parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) == '/'),
|
||||||
|
@ -6,9 +6,15 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="hidden-xs col-md-3 col-xs-5 text-right"></div>
|
<div class="hidden-xs col-md-3 col-xs-5 text-right"></div>
|
||||||
<div class="col-md-3 col-xs-12">
|
<div class="col-md-3 col-xs-12">
|
||||||
<a target="_blank" href="/sogo-auth.php?login={{ mailcow_cc_username }}" role="button" class="btn btn-default btn-block btn-xs-lg">
|
{% if dual_login and allow_admin_email_login == 'n' %}
|
||||||
<i class="bi bi-inbox-fill"></i> {{ lang.user.open_webmail_sso }}
|
<button disabled class="btn btn-default btn-block btn-xs-lg">
|
||||||
</a>
|
<i class="bi bi-inbox-fill"></i> {{ lang.user.open_webmail_sso }}
|
||||||
|
</button>
|
||||||
|
{% else %}
|
||||||
|
<a target="_blank" href="#" disabled role="button" class="btn btn-default btn-block btn-xs-lg">
|
||||||
|
<i class="bi bi-inbox-fill"></i> {{ lang.user.open_webmail_sso }}
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
|
Loading…
Reference in New Issue
Block a user