Skip to content
This repository was archived by the owner on Jul 24, 2025. It is now read-only.

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

@GMolini

Description

@GMolini

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions