Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/core/src
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2021-03-03 13:18:33 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2021-03-08 17:36:47 +0300
commit4076dfb0194a00f4795e87f2ae84e626a174bd06 (patch)
tree79c0e731f3d3cb3f31edcb8a962a84d1c4e41ad8 /core/src
parent43b333331d31da78e21298368f14a4fce393852a (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.js1
-rw-r--r--core/src/views/Login.vue15
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 {