Lag in Restricting Dashboard Tile Display in Perspective

I have a dashboard view with multiple tiles that represent different sites. Each tile uses the same embedded view with params to control the data that is displayed.

I've used expression binding on the display property for each tile so that they will display based on the users authorization role (see script below). It works, however all of the tiles display for a fraction of a second on the screen after logging in as any authorized user, and then they are quickly hidden. I don't think any actual data is being displayed since I have set the embedded view to load after-parent. Is there a way to prevent this loading issue, and is the data still restricted?

If ({session.props.auth.user.roles[0]}='Administrator',true,
If ({session.props.auth.user.roles[0]}='test_client_sisters',true,false))

Right click the property you have bound, and change it to be 'Persistent', and ensure that you save the project with a value of false specified.

Then the initial load in of the page will use the persisted value (false) and only if the binding evaluates to true will it be shown.

Separately, I'd recommend switching to the isAuthorized expression function:

As in:
isAuthorized(true, "Authenticated/Roles/Administrator", "Authenticated/Roles/test_client_sisters")

2 Likes