SMART icon indicating copy to clipboard operation
SMART copied to clipboard

WIP: Admin lockout fix

Open AstridKery opened this issue 3 years ago • 0 comments

This MR adds an admin timeout. It's currently set to 3 minutes to make it easier for reviewers to test it, but we'll probably want it to be more like an hour or two. @peridoteagle this is ready for review but we'll need to update the timeout before merging.

This MR borrows from an earlier one of @schittarath3-rti to update the AdminProgress table each time an admin with the lock preforms an action. The change is that if another admin enters the coding page, SMART merely checks if the first admin's last action was longer than a certain cutoff. If it is, the old admin's progress is replaced by the new admin.

If the old admin still has the page loaded and tries to complete an action on the skew, recycle bin, or skipped pages, they won't work, and instead a message will display letting them know they lost access.

Caveat: currently when the second admin is given access, they have to refresh twice to get the unlocked page. This is because I think the enter_coding_page function is asynchronous and finishes after the initial refresh found that they were locked out. I don't think this is a problem so long as people know they might want to refresh again?

AstridKery avatar Aug 30 '22 20:08 AstridKery