# Limit use of dashboard to one user

**URL:** <https://discourse.nodered.org/t/limit-use-of-dashboard-to-one-user/43842>\
**Category:** Dashboard\
**Created:** [8 April 2021 06:03 UTC](https://discourse.nodered.org/t/limit-use-of-dashboard-to-one-user/43842 "2021-04-08T06:03:21Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![sinkovcm](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sinkovcm/32/39980_2.png) [@sinkovcm](https://discourse.nodered.org/u/sinkovcm)\
**Post date:** [8 April 2021 06:03 UTC](https://discourse.nodered.org/t/limit-use-of-dashboard-to-one-user/43842/1 "2021-04-08T06:03:21Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [8 April 2021 07:22 UTC](https://discourse.nodered.org/t/limit-use-of-dashboard-to-one-user/43842/2 "2021-04-08T07:22:13Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![sinkovcm](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sinkovcm/32/39980_2.png) [@sinkovcm](https://discourse.nodered.org/u/sinkovcm)\
**Post date:** [8 April 2021 07:39 UTC](https://discourse.nodered.org/t/limit-use-of-dashboard-to-one-user/43842/3 "2021-04-08T07:39:59Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![droberts](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/droberts/32/40295_2.png) [@droberts](https://discourse.nodered.org/u/droberts)\
**Post date:** [8 April 2021 08:31 UTC](https://discourse.nodered.org/t/limit-use-of-dashboard-to-one-user/43842/4 "2021-04-08T08:31:55Z")

</div>

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`.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/d/6d0769e41dc1eb06f6f239f0cbcd14bffb51a3b6.png)

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [8 April 2021 08:37 UTC](https://discourse.nodered.org/t/limit-use-of-dashboard-to-one-user/43842/5 "2021-04-08T08:37:17Z")

</div>

> [@sinkovcm](#):
>
> If someone change something on PC or phone the interface on machine should be disabled that time.

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

---

<div class="post-metadata">

**Author:** ![sinkovcm](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sinkovcm/32/39980_2.png) [@sinkovcm](https://discourse.nodered.org/u/sinkovcm)\
**Post date:** [8 April 2021 10:23 UTC](https://discourse.nodered.org/t/limit-use-of-dashboard-to-one-user/43842/6 "2021-04-08T10:23:46Z")

</div>

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

@Colin  
Yes, node-red dashboard...

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [8 May 2021 10:24 UTC](https://discourse.nodered.org/t/limit-use-of-dashboard-to-one-user/43842/7 "2021-05-08T10:24:24Z")

</div>

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