Skip to content

armgit / dashy

Public Imported from GitHub
0

πŸš€ A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!

:lock: Small update to router, empty array means no users

Alicia Sykesba2ac7661d60
diff --git a/src/router.js b/src/router.js
index f20b9803..a34cfb1a 100644
--- a/src/router.js
+++ b/src/router.js
@@ -11,9 +11,14 @@ import { metaTagData } from '@/utils/defaults';
Vue.use(Router);
+/**
+ * Checks if the current user is either authenticated,
+ * or if authentication is not enabled
+ * @returns true if user logged in, or user management not enabled
+ */
const isAuthenticated = () => {
const users = config.appConfig.auth;
- return (!users || isLoggedIn(users));
+ return (!users || users.length === 0 || isLoggedIn(users));
};
const router = new Router({