summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2023-06-14 20:19:18 +0300
committerAndrew Dolgov <[email protected]>2023-06-14 20:19:18 +0300
commitdc25a9cf6816b756cb38490eab93f02589c44a10 (patch)
tree7f98992d670794778be2cfc26eb1a632b40a7147
parenta9d8fd8bdce9381645f589ac4dcdaec1203ed5b7 (diff)
disable app passwords in the UI if auth_internal is not loaded
-rw-r--r--classes/pref/prefs.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/classes/pref/prefs.php b/classes/pref/prefs.php
index 1e02a0508..2ce5f061b 100644
--- a/classes/pref/prefs.php
+++ b/classes/pref/prefs.php
@@ -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 $this->index_auth_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() ?>