Navigation links view based on Auth User

Hello.

I don’t see conditional rendering of Nav links.

Would love to enable some views only to some user groups.

I can use buttons but is not the same.

Any tips?

This is in the works on the new navigation editor. Not currently possible to get dynamic links on the navigation menu.

Thanks.
Is there a way to protect a route?
Like if a user without permissions lands on an admin page, to redirect the user back before the page loads and show the info?

You can have information on the user and check that in page load and redirect away when needed. Note that this can be avoided in the frontend and there’s nothing you can do to prevent that, so all sensitive data should be validated through a backend service.

Which is the page load event?
I tried page will mount, page created and page mounted, and they all load the page and do not navigate back or open another page.

My logic is to check if the user belongs to a user group, if true, continue, if not navigate back or send to another page.

SOLUTION:

Was able to do this by adding a delay for the if to complete then opening a new page if false and hide spinner if true.