Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZM Authentication settings does not update user restricted monitors #926

Closed
exterity opened this issue Apr 11, 2020 · 12 comments
Closed

ZM Authentication settings does not update user restricted monitors #926

exterity opened this issue Apr 11, 2020 · 12 comments
Labels
bug Good first issue I like you already

Comments

@exterity
Copy link

exterity commented Apr 11, 2020

Event Server version
5.11.3

Hooks version
5.11.3

The version of zmNinja you are reporting:
1.3.096

The version of ZoneMinder you are using:
1.34.9, Ubuntu 18.04

Platform zmNinja is running on
Android 10

What is the nature of your issue
Bug

Details

Re-procedure:

  1. Configuring:
  • I have 2 cameras in Zoneminder: Camera1, Camera2 and 2 users available: Bob and Alice. From the restricted monitor at Options->Users->Restricted monitors
  • Bob can see Camera 1 and Camera 2
  • Alice only see Camera1
  1. Testing:
  • Bob logins to Zmninja, and see both cameras. It works as expected.
  • Continue to change the credentials from Bob to Alice at Settings -> ZM Authentication, Alice also can see both cameras. It does not work as expected.
  1. Press Save once more time, and quit. Re-open zmninja and login as Alice, but the same result.

  2. Remove zmninja, reinstall from Google Play. Reconfigure and login to zmninja by Alice. At this time, Alice can see only Camera1. It works as expected.

As above steps, Alice should only see the Camera1 when updating ZM Authentication on zmninja. Seems that zmninja still keep the credentials for the first logon user.

I do not know if this is expected behaviour on Zmninja or is it a bug.

@welcome
Copy link

welcome bot commented Apr 11, 2020

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you follow the issue template or I may not respond.

@pliablepixels
Copy link
Member

I think the reason this is happening is due to the 24 hr cache. Try this:

  1. Login as Bob, make sure it works
  2. Switch to Alice then clear the Menu->API Cache
  3. Exit app
  4. Restart app and see if Alice looks ok

@pliablepixels
Copy link
Member

Oops no, that is not the issue. It's an auth token issue. Will fix.

@exterity
Copy link
Author

Just for your information, I tried those steps but it did not work.

@pliablepixels
Copy link
Member

pliablepixels commented Apr 11, 2020

I did some basic tests and it seems to be working. Is there a desktop version you use that I can send to test.

@pliablepixels pliablepixels added the Good first issue I like you already label Apr 11, 2020
@exterity
Copy link
Author

Yes, I use Ubuntu Dekstop. Please send me for test. Thank you very much.

@pliablepixels
Copy link
Member

@exterity
Copy link
Author

Yeah, cool. It works. Thanks for the fix :)

@exterity
Copy link
Author

Just a small thing, the "report events" options from Settings -> Event Server of 2 users does not update correctly when switching users. Let says: Bob selected report events for Camera1 and Camera2. Then switch user as Alice. Alice selected report events for Camera1. Switch back to Bob, this time Bob only see the Camera1 selected, but not Camera2. It can cause missing event report whenever switching users.

@exterity
Copy link
Author

and the Montage view does not show camera correctly for Bob (only show Camera 1) when switch back to Bob from Bob -> Alice -> Bob. Bob has to select profile "all monitors" again to view all cameras.

@pliablepixels
Copy link
Member

Yes, so two things:

a) It may just be better for you to create two server profiles "bob" and "alice" instead of manually switching auth. Then the montage profiles etc will work (all data is scoped inside the server name). H

b) The ES is another story altogether. It does not keep a record of the username - it only remembers the device token. So even if Bob and alice are switching, it will consider it a single device. Fixing this will require an ES side re-architecture of data format. You might want want to list that aspect as a separate issue and I'll get to it (but not soon)

@exterity
Copy link
Author

I see. Thank you very much for the quick fix.

Simpler1 pushed a commit to Simpler1/zmNinja that referenced this issue Oct 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Good first issue I like you already
Projects
None yet
Development

No branches or pull requests

2 participants