You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
export default function manager({ next, store }) {
if (store.getters["auth/isManager"]) next();
else next({ name: "notFound" });
}
When I login with user role manager the route 'domain' works. If I login with admin it gives 404 (notFound)
It seems like it persist the last middleware (if I am logged is as admin and the last middleware is manager) it gives notFound from manager middleware.
Any idea how can I make it work for both admin and manager ?
The text was updated successfully, but these errors were encountered:
Hello,
Am using this project and I found an issue with middleware.
On my app I check for admin by role. In store -> Auth.js
I have created and tested with another role manager:
and in the index.js route:
Created a middleware manager:
When I login with user role manager the route 'domain' works. If I login with admin it gives 404 (notFound)
It seems like it persist the last middleware (if I am logged is as admin and the last middleware is manager) it gives notFound from manager middleware.
Any idea how can I make it work for both admin and manager ?
The text was updated successfully, but these errors were encountered: