Limit use of dashboard to one user

Hi,

I want to limit access to dashboard ui to only one user from external device. Is this possible and how?

I have a RPI 4 and touch screen on device. When RPI is boots opens opens chromium in kiosk mode so we have full screen dashboards ui showing on device.

Welcome to the forum @sinkovcm

Sorry, but I have to ask a number of questions to fully understand what you want.

  1. Do you mean only one particular user or only one user at a time?

  2. Also, what do you mean by 'external device'? A device on the internet or just any other device (local network or internet).

  3. When you say 'one user from external device' do you mean one on an external device plus any number on the machine running node red?

Hi @Colin ,

thanks, answers below.

  1. One user at a time (not relevant which one). Node red server should only allow one external session at the same time.
  2. External device in local network (device connected to Wifi) such as browser on phone or PC.
  3. Yes, 1 session runs on machine itself (where node red server runs) another session on phone or PC. I need to have interlock among them. If someone change something on PC or phone the interface on machine should be disabled that time.

When a user connects to the dashboard, the UI-Control nodes output a connect event. Similarly, when a dashboard tab is closed, they send a close event. I believe messages sent to the front end from your flow, if they have a socketid property, will only be sent to that specific socket.

You could therefore build a function, which logs all connected socketid's and removes them if a close event is detected. When a new ID is connected, you can send a message to all other sessions triggering a popup, or try push them onto a 'locked' tab with no interaction possible. When the 'live' user disconnects, the last connected one can be re-enabled.

You could also use a switch node, or custom function to filter data being returned from the UI to the flow to only listen to things from the most recently connected socketid.

1 Like

What sort of change do you mean?
You are talking about the node red dashboard not the node red flow editor aren't you?

@droberts
thanks, I think this will probably do the trick...I will try that..

@Colin
Yes, node-red dashboard...

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.