-
-
Notifications
You must be signed in to change notification settings - Fork 264
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
Hide side menu options depending on the user role #287
Comments
I need this feature too |
Only way I can see this to be achieved is by converting the parsedContent within Documentation.php to an array, taking the url per item (if any) and then filtering/feeding that to the "viewLarecipe" gate. Would that be the way to go? |
I don't have the time to completely work it out right now. Maybe later. But if anyone feels to take a stab at it, I meant something along the lines of this. Again, there are probably way neater ways to do this, but it will work I guess. And when cached, it shouldn't we too much of a performance hit.
|
We have examples how to use a gate to enable/disable access to a specific page, but in for a good user experience the users that don't have access to some pages should now saw it on the side menu.
How can we hide some pages for some users on the sidebar?
In my case I want to create a documentation for admins and other for end users, the ideal approach was to have a different route for each type of documentation for example "/docs/..." for end users and "/admin-docs/..." for administrators, but I think this was not possible it should be possible to change the sidebar menu depending on the users role/permission.
The text was updated successfully, but these errors were encountered: