From cff537b9ea9d14c048abf99e3c7b0daf4a82d9c6 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Sun, 10 Oct 2021 21:10:42 +0100 Subject: [PATCH] :boom: (#177) Depricates old auth struct --- src/utils/Auth.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/utils/Auth.js b/src/utils/Auth.js index a1e8fdbd..a1ac8c90 100644 --- a/src/utils/Auth.js +++ b/src/utils/Auth.js @@ -46,7 +46,7 @@ const getUsers = () => { // Check if the user is still using previous schema type if (Array.isArray(auth)) { printWarning(); // Print warning message - return auth; // Let the user proceed anyway, will remove in V 1.7.0 + return []; // Support for old data structure now removed } // Otherwise, return the users array, if available return auth.users || []; @@ -95,12 +95,7 @@ export const isAuthEnabled = () => { /* Returns true if guest access is enabled */ export const isGuestAccessEnabled = () => { const appConfig = getAppConfig(); - if (appConfig.enableGuestAccess) { - // User is still using the old auth method - printWarning(); - return true; - } - if (appConfig.auth && !Array.isArray(appConfig.auth)) { + if (appConfig.auth && typeof appConfig.auth === 'object') { return appConfig.auth.enableGuestAccess || false; } return false;