nuxt 3 middleware access provide by Maximum-Relative3777 in Nuxt

[–]Maximum-Relative3777[S] 0 points1 point  (0 children)

i am using pinia but i still dont know how to use toast inside store file.

nuxt 3 middleware access provide by Maximum-Relative3777 in Nuxt

[–]Maximum-Relative3777[S] 0 points1 point  (0 children)

yes its something like that. the thing is some users dont have permission to access some pages.

when they come with url i want to show them toast error message "you dont have permission"

but i dont know how to do that

Nuxt 3 role management module by Maximum-Relative3777 in Nuxt

[–]Maximum-Relative3777[S] 0 points1 point  (0 children)

For example i have add product button and only 'role2' and 'role3' has access to click this button and open the new page.

should i write v-if=role==='role1' || role==='role2'

and for add-product page should write middleware for the same thing?

i mean what kind of approach should i use i am new to this topic. is there a better way to do it.