diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2021-03-03 13:18:33 +0300 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2021-03-08 17:36:47 +0300 |
commit | 4076dfb0194a00f4795e87f2ae84e626a174bd06 (patch) | |
tree | 79c0e731f3d3cb3f31edcb8a962a84d1c4e41ad8 /core/src | |
parent | 43b333331d31da78e21298368f14a4fce393852a (diff) |
Allow admins to disable the login form
In case they want to not allow this because they use SSO (and do not
want the users to enter their credentials there by accident).
?direct=1 still works.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/login.js | 1 | ||||
-rw-r--r-- | core/src/views/Login.vue | 15 |
2 files changed, 15 insertions, 1 deletions
diff --git a/core/src/login.js b/core/src/login.js index a7d738ee9ef..b23da4bebd1 100644 --- a/core/src/login.js +++ b/core/src/login.js @@ -67,5 +67,6 @@ new View({ hasPasswordless: fromStateOr('webauthn-available', false), isHttps: window.location.protocol === 'https:', hasPublicKeyCredential: typeof (window.PublicKeyCredential) !== 'undefined', + hideLoginForm: fromStateOr('hideLoginForm', false), }, }).$mount('#login') diff --git a/core/src/views/Login.vue b/core/src/views/Login.vue index 0a5708bb5c3..c75ae98030b 100644 --- a/core/src/views/Login.vue +++ b/core/src/views/Login.vue @@ -20,7 +20,7 @@ --> <template> - <div> + <div v-if="!hideLoginForm || directLogin"> <transition name="fade" mode="out-in"> <div v-if="!passwordlessLogin && !resetPassword && resetPasswordTarget === ''" key="login"> @@ -84,6 +84,15 @@ </div> </transition> </div> + <div v-else> + <transition name="fade" mode="out-in"> + <div class="warning"> + {{ t('core', 'Login form is disabled.') }}<br> + <small>{{ t('core', 'Please contact your administrator.') }} + </small> + </div> + </transition> + </div> </template> <script> @@ -153,6 +162,10 @@ export default { type: Boolean, default: false, }, + hideLoginForm: { + type: Boolean, + default: false + } }, data() { return { |