luc-github / ESP3D-WEBUI

A Web UI for ESP8266 or ESP32 based boards connected to 3D printers / CNC
GNU General Public License v3.0
752 stars 305 forks source link

New login forces the current user off[BUG] #154

Closed Hagar01 closed 3 years ago

Hagar01 commented 3 years ago

Describe the bug While setting up and logged in as admin, my son in his curiosity tried to log in as a user. This forced me off without asking.

To Reproduce Log in from several sources at once.

Expected behavior The UI should ask the current user if they have finished and are ready to let go. If they are in the middle of doing something then it could upset things.

ESP3D Firmware: (please complete the following information)

Target Firmware: (please complete the following information)

Board used (please complete the following information):

Browser used (please complete the following information):

Additional context It would be nice to allow up to, maybe, 5 or 6 logins at once (configurable). With the first being Read/Write, and the rest being read only. The subsequent users should then request write access with either a timeout or a popup on the primary login.

github-actions[bot] commented 3 years ago

Thank your for submiting, please be sure you followed template or your issue may be dismissed.

luc-github commented 3 years ago

yes it works like this if you try to connect and failed you are disconnected, it is by design

using more login is not on roadmap, currently system allow one login/connexion at once so all other open connections are closed when new connection happen

I do not understand the user case of several read only users, can you elaborate?

Hagar01 commented 3 years ago

So any new user automatically forces the original user off?

A read only login would allow others to see if the printer is busy and then ask for write access.

Currently the next user forces the original one off.

luc-github commented 3 years ago

yes as only one user can control printer and webserver handle only one query at once

I still do not understand the user case - why a printer should have several users to access it at once?

Hagar01 commented 3 years ago

It is to NOT force the original user off. This is bad behavior. The original user should have the priority, NOT the second user.

Hagar01 commented 3 years ago

And why cant the admin log on to check the printer occasionaly?

They dont need to have write access to do this, just view the current temps etc.

luc-github commented 3 years ago

This is bad behavior. The original user should have the priority, NOT the second user.

Ok this is your point of view but this is current design, what happen if page is open but no one in front to let access ? others connections wait for current user to release the page ? I do not plan to handle complex situation - one printer = one user

And why cant the admin log on to check the printer occasionaly?

why is there a need for this ?

I could imagine a classroom / Fablab management but this is not implemented yet, this may be part of this https://github.com/luc-github/ESP3D-WEBUI/issues/85 in future

luc-github commented 3 years ago

I think question has been answered, so I close issue then

github-actions[bot] commented 3 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.