I’m looking to add a docked view that is open for every view of my project, so I have it configured under shared settings. My goal is to only have administrators see this docked view, and for everyone else to not be able to see it.
I’ve tried using session events for page startup and session startup that use this script:
if "Administrator" not in self.auth.user.roles: system.perspective.closeDock('admin')
This seems to work OK, as the dock immediately closes for the users who do not have sufficient rights. But, when someone navigates to a new page in the project, the dock immediately reopens.
Is there only way to configure the dock only to open for every page on the project in the shared settings only based on a certain criteria like what I am trying to achieve? This would be better than trying to close it based on the user’s rights.