Parse auth config from /info

This commit is contained in:
kolaente 2020-11-21 14:56:14 +01:00
parent ffed665bbb
commit 769a18c29d
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 12 additions and 0 deletions

View File

@ -1,5 +1,6 @@
import {CONFIG} from '../mutation-types'
import {HTTPFactory} from '@/http-common'
import {objectToCamelCase} from '@/helpers/case'
export default {
namespaced: true,
@ -20,6 +21,16 @@ export default {
privacyPolicyUrl: '',
},
caldavEnabled: false,
auth: {
local: {
enabled: false,
},
openidConnect: {
enabled: false,
redirectUrl: '',
providers: [],
},
},
}),
mutations: {
[CONFIG](state, config) {
@ -36,6 +47,7 @@ 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)
},
},
actions: {