Modifying Sidebar according to role

Is there a way to change what appears in the sidebar according to the role assigned to the user?

If you want to change the menu in the sidebar based on roles you will need to add permissions for roles to pages. If a user can’t access a certain page, it won’t show in the menu. So, like this, you can show different page menus to different users. Is that what you want to do?

That sounds right. I’ll give it a shot.

There are a lot of places to do permissions. Can you show me what I’ll have to do to make this work?

Also, is there any way to completely hide the sidebar from some roles, while showing it for others?