Fix setting auth config from api in state
continuous-integration/drone/pr Build is passing Details

This commit is contained in:
kolaente 2020-11-21 15:41:12 +01:00
parent ab0c30013b
commit 2429ba4e4a
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,5 @@
import Vue from 'vue'
import {CONFIG} from '../mutation-types'
import {HTTPFactory} from '@/http-common'
import {objectToCamelCase} from '@/helpers/case'
@ -23,7 +25,7 @@ export default {
caldavEnabled: false,
auth: {
local: {
enabled: false,
enabled: true,
},
openidConnect: {
enabled: false,
@ -47,7 +49,11 @@ export default {
state.legal.imprintUrl = config.legal.imprint_url
state.legal.privacyPolicyUrl = config.legal.privacy_policy_url
state.caldavEnabled = config.caldav_enabled
state.auth = objectToCamelCase(config.auth)
const auth = objectToCamelCase(config.auth)
state.auth.local.enabled = auth.local.enabled
state.auth.openidConnect.enabled = auth.openidConnect.enabled
state.auth.openidConnect.redirectUrl = auth.openidConnect.redirectUrl
Vue.set(state.auth.openidConnect, 'providers', auth.openidConnect.providers)
},
},
actions: {