How to hide menu tree items based on roles

Hi Team,

I have created roles for Admin and operator.
Here I am using Tree component for menu in perspective.
I want to hide Dashboard if operator logs in as in below image..
please guide.
image

You'll have to bind to the items property or write to it in an onStartup script. In the script, check if the current user has appropriate roles or security levels, and generate your tree structure appropriately.

If you right-click on your existing items and copy, you can then paste that into a script console to have a starting point to work from. (You'll have to capitalize boolean literals through...)

Ignition hack: you could put

true = True
false = False

as the top of your code so that you don't have to do all that boolean replacement.