diff --git a/src/components/Configuration/JsonEditor.vue b/src/components/Configuration/JsonEditor.vue index fc618cf5..28782dc4 100644 --- a/src/components/Configuration/JsonEditor.vue +++ b/src/components/Configuration/JsonEditor.vue @@ -102,7 +102,7 @@ export default { methods: { shouldAllowWriteToDisk() { const { appConfig } = this.config; - return appConfig.allowConfigEdit !== false && isUserAdmin(appConfig.auth); + return appConfig.allowConfigEdit !== false && isUserAdmin(); }, save() { if (this.saveMode === 'local' || !this.allowWriteToDisk) { diff --git a/src/components/Settings/SettingsContainer.vue b/src/components/Settings/SettingsContainer.vue index e3e2e4d6..0024ad6c 100644 --- a/src/components/Settings/SettingsContainer.vue +++ b/src/components/Settings/SettingsContainer.vue @@ -114,7 +114,7 @@ export default { * then they will never be able to view the homepage, so no button needed */ userState() { - return getUserState(this.appConfig || {}); + return getUserState(); }, }, data() { diff --git a/src/router.js b/src/router.js index aaa52e66..2800f8a5 100644 --- a/src/router.js +++ b/src/router.js @@ -31,7 +31,7 @@ const isGuestEnabled = () => { /* Returns true if user is already authenticated, or if auth is not enabled */ const isAuthenticated = () => { const users = config.appConfig.auth; - return (!users || users.length === 0 || isLoggedIn(users) || isGuestEnabled()); + return (!users || users.length === 0 || isLoggedIn() || isGuestEnabled()); }; /* Get the users chosen starting view from app config, or return default */ diff --git a/src/views/Login.vue b/src/views/Login.vue index 3e287a6c..a86908f3 100644 --- a/src/views/Login.vue +++ b/src/views/Login.vue @@ -126,7 +126,7 @@ export default { }, isUserAlreadyLoggedIn() { const users = this.appConfig.auth; - const loggedIn = (!users || users.length === 0 || isLoggedIn(users)); + const loggedIn = (!users || users.length === 0 || isLoggedIn()); return (loggedIn && this.existingUsername); }, isGuestAccessEnabled() {