Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

meta roles do not work when loading page directly in browser #704

Open
GMolini opened this issue Sep 17, 2024 · 0 comments
Open

meta roles do not work when loading page directly in browser #704

GMolini opened this issue Sep 17, 2024 · 0 comments

Comments

@GMolini
Copy link

GMolini commented Sep 17, 2024

Ive got the following path in my router.js

  {
    path: '/organisations/:organisation_id(\\d+)',
    name: 'organisation',
    component: organisationComponent,
    meta: {
      auth: {
        roles: ['full_admin'],
        rolesKey: 'admin_privileges',
      }
    }
  },

If I click on a router link with an unprivileged user, the meta auth is checked, and the user is redirected to the forbiddenRedirect route. But, If I copy paste the url directly in the browser like http://localhost:5173/organisations/2 then the check is not done and the user is not redirected correctly.

@GMolini GMolini changed the title meta roles do not work when loading directly page meta roles do not work when loading page directly in browser Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant