Locking a screen or function

HI guys
How would we be able to lock a certain screen from being accessed by more than one user at a time.

Example Scenario:
I have multiple users and they all have access to all pages. They must have access to all pages.

I have a stock count page.
I dont want more than one person to access the stock page at the same time to do stock takes, although all the pages are able to be accessed.

I think that would require some real-time capabilities, so you’d have to use Supabase as a backend.

Then, you can maybe handle this using their RLS capabilities, to check is a user socket is currently opened on a page.

To be honest, I’ve never done this or saw this use-case. Maybe someone has a better way of doing this?