KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

DashBoard: menu items based on user level #1796

Closed george quinones opened this topic on on Dec 26, 2020 - 2 comments

george quinones commented on Dec 26, 2020

How would I restrict menu items based on User roles

george quinones commented on Dec 26, 2020

I kind of figured out

"Admin"=>AdminBoard::create()
                    ->title("Admin")
                    ->hidden(($_SESSION['user_role'] === 'admin')?false:true)
                    ->icon("fa fa-home"),
KoolReport commented on Dec 26, 2020

It is better that you use the "enabled()" because enabled property will totally prevent access to AdminBoard but "hidden" only hide the AdminBoard to show on menu but still be available to be accessed.

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
solved

None