Skip to content

Commit

Permalink
wip: manage public applications #858
Browse files Browse the repository at this point in the history
  • Loading branch information
tristan-greffe committed May 22, 2024
1 parent 568e34f commit 20c2061
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/client/guards.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export function authenticationGuard (user, to, from) {
if (to.path.startsWith('/oauth/')) return true

// Routes accessible whatever the authentication state, eg public
if (_.get(to, 'meta.authenticated') && _.get(to, 'meta.unauthenticated') || _.get(to, 'meta.public')) {
if ((_.get(to, 'meta.authenticated') && _.get(to, 'meta.unauthenticated')) || _.get(to, 'meta.public')) {
// First, check the root route, since all routes are children of the root route
if (to.path === '/') return 'home'
// Then, check if the route exists. If the target route does not exist, cancel the navigation
Expand Down

0 comments on commit 20c2061

Please sign in to comment.