Forum Discussion
fc
3 years agoContributor
Lock dashboard to other users
Hi all, I'm developing a dashboard that will likely be used by 10 different people. I'd like to lock the access to other users if one user has the dashboard already open (and maybe until he/she cl...
- 3 years ago
I suspect that this will give issues, as security rights are refreshed fairly rarely (i.e. at login).
I more classic approach would be:
- have a custom database table with only a couple of fields (e.g. if the page is locked, who locked it, when it was locked)
- when a user opens it, in the page-load business rule, retrieve the relevant fields.
- If it's not locked, or it was locked a very long time ago (e.g. more than 2 hours), then update the fields and let the user in; otherwise, bail with an error message.
As you mention, unlocking is an issue. I think there is a "page unload" event somewhere, but can't look it up right now; but keeping track of the last-locked time, you can basically use it with session-expiration strategies that will unlock it no matter what.
NicolasArgente
3 years agoValued Contributor
Hey fc!
I have never done that and never heard of a functionality to do that, as it is meant for group work, right?
If you need to take that road, my thinking could be to create a specific group security group for this dashboard.
You would have the starting dashboard page to "activate" the dashboard. On the back, a BR would add the username to this security group and check that there is only one user in this security group. If more then one, it drops a message saying that the other person is already using it... Now the limitation is that if the user does not "unlock" the dashboard after use, then it will always be blocked. You should maybe make this automatic too.
As you see it is not straighforward, but possible.
JackLacava
OneStream Employee
3 years agoI suspect that this will give issues, as security rights are refreshed fairly rarely (i.e. at login).
I more classic approach would be:
- have a custom database table with only a couple of fields (e.g. if the page is locked, who locked it, when it was locked)
- when a user opens it, in the page-load business rule, retrieve the relevant fields.
- If it's not locked, or it was locked a very long time ago (e.g. more than 2 hours), then update the fields and let the user in; otherwise, bail with an error message.
As you mention, unlocking is an issue. I think there is a "page unload" event somewhere, but can't look it up right now; but keeping track of the last-locked time, you can basically use it with session-expiration strategies that will unlock it no matter what.
Related Content
- 5 months ago
- 2 years ago