mirror of
https://github.com/Lissy93/dashy.git
synced 2025-07-23 21:55:30 +02:00
🔒 Small update to router, empty array means no users
This commit is contained in:
parent
690409d642
commit
ba2ac7661d
@ -11,9 +11,14 @@ import { metaTagData } from '@/utils/defaults';
|
|||||||
|
|
||||||
Vue.use(Router);
|
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 isAuthenticated = () => {
|
||||||
const users = config.appConfig.auth;
|
const users = config.appConfig.auth;
|
||||||
return (!users || isLoggedIn(users));
|
return (!users || users.length === 0 || isLoggedIn(users));
|
||||||
};
|
};
|
||||||
|
|
||||||
const router = new Router({
|
const router = new Router({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user