disable app passwords in the UI if auth_internal is not loaded

This commit is contained in:
Andrew Dolgov 2023-06-14 20:19:18 +03:00
parent a9d8fd8bdc
commit dc25a9cf68
No known key found for this signature in database
GPG Key ID: 1A56B4FA25D4AF2A
1 changed files with 5 additions and 1 deletions

View File

@ -533,7 +533,11 @@ class Pref_Prefs extends Handler_Protected {
<?php $this->index_auth_password() ?>
</div>
<div dojoType='dijit.layout.ContentPane' title="<?= __('App passwords') ?>">
<?php if (PluginHost::getInstance()->get_plugin('auth_internal')) { ?>
<?php $this->index_auth_app_passwords() ?>
<?php } else { ?>
<?= format_warning("App passwords are only available if <b>auth_internal<b> plugin is enabled."); ?>
<?php } ?>
</div>
<div dojoType='dijit.layout.ContentPane' title="<?= __('Authenticator (OTP)') ?>">
<?php $this->index_auth_2fa() ?>