ZoneMinder / zmNinja

High performance, cross platform ionic app for Home/Commerical Security Surveillance using ZoneMinder
http://zmninja.zoneminder.com
Other
1.02k stars 271 forks source link

restricted users for event notification not working #391

Closed mafalb closed 7 years ago

mafalb commented 8 years ago

Platform & OS Version Windows 7

The version of the app you are reporting: 1.2.28

What is the nature of your issue Bug

Details I do have a zoneminder installation with 50+ cameras. zmtrigger.pl catches tcp notification from the cameras and begins to record. I also have a user who does have permissions to 3 cameras. When I start zmninja, zmeventnotification tells me in the log (I enhanced the logging slightly)

23/11/16 19:10:25.612524 zmeventnotification[61791].INF [Checking alarm
rules for 10.246.224.222:50794]
23/11/16 19:10:25.612911 zmeventnotification[61791].INF [monlist: ]
23/11/16 19:10:25.613288 zmeventnotification[61791].INF [monlist: for
10.246.224.222:50794: ]

Events for every Camera is coming to zmninja (and thats a lot). I would have expected that only events for the 3 cameras are coming through.

If I go to Settings -> Save then the log messages changes

23/11/16 19:11:40.613926 zmeventnotification[61791].INF [Checking alarm
rules for 10.246.224.222:50794]
23/11/16 19:11:40.614554 zmeventnotification[61791].INF [monlist: 1,2,3]
23/11/16 19:11:40.615179 zmeventnotification[61791].INF [monlist: for
10.246.224.222:50794: 1,2,3]

and after that only events from the specified cameras for that user are communicated to zmninja, it seems, which is the expected behaviour.

I think the initial authorisation goes wrong.

pliablepixels commented 8 years ago

Yup - correct. As of today, the event server does not filter events based on user permissions - it directly picks up alarms from shared memory for performance. The workaround, as you've discovered is to force specify the monitor list via zmNinja - this should be done by default, which I'll fix.

pliablepixels commented 8 years ago

hopefully fixed - please reopen if its not fixed in next release

mafalb commented 8 years ago

Thank you I will try it...

mafalb commented 7 years ago

tried v1.2.30, the bug still exists

pliablepixels commented 7 years ago

Please do this:

  1. In zmNinja, disable event server, hit save

  2. In zmNinja clear logs

  3. In zmNinja, make sure debug logs are on, then kill the app

  4. Stop zmeventserver

  5. Empty out /etc/private/tokens.txt (don't delete it)

  6. Start zmeventserver, and tail the logs (tail -f /var/log/syslog | grep zmeventserver)

  7. Start zmNinja

  8. Enable event server

Please post Debug logs of zmNinja and logs from zmeventserver

pliablepixels commented 7 years ago

actually never mind - I think I found the bug.

pliablepixels commented 7 years ago

Update to event server 0.92 required https://github.com/pliablepixels/zmeventserver/blob/master/zmeventnotification.pl

pliablepixels commented 7 years ago

@mafalb - did you try with the latest APK update ? You also need the updated event server (need to restart event server)

pliablepixels commented 7 years ago

closing - assuming resolved. Please re-open if it still is an issue