Page 1 of 1

How to hide Filters button for restricted users

Posted: Wed May 17, 2017 8:29 am
by stefp
Hi ,I have Zoneminder 1.30.2 on Ubuntu 14.04 LTS ,and add user that can only view (Stream -View ,Events -View ,Control - None ,Monitors - None,Groups - None ,System - None ) ,but button Filters is enable and can be used .I want to hide/disable that button ,haw ?

Re: How to hide Filters button for restricted users

Posted: Thu May 18, 2017 12:24 pm
by rockedge
Hiding the filter button! First time I even thought of this feature......one that really makes sense. I do not know of a way without modifying the zoneminder code directly but I never really looked! I will test around and see what it will take to hide the Filters button and access to the filters based on permissions. Really should be noted in the Features Suggestion thread.

Re: How to hide Filters button for restricted users

Posted: Thu May 18, 2017 12:27 pm
by knight-of-ni
The filter feature in ZoneMinder is tied to the View Events permission.

Re: How to hide Filters button for restricted users

Posted: Thu May 18, 2017 12:49 pm
by stefp
Yes ,right .But I want user can view Events too ,not only Stream (live view) . But if is impossible and that will work .
Or if is possible if Stream is - View ,Filters to be disabled ?
Thank you.

Re: How to hide Filters button for restricted users

Posted: Thu May 18, 2017 4:12 pm
by rockedge
add a new option for Filters->View/none ?

Re: How to hide Filters button for restricted users

Posted: Thu May 18, 2017 4:20 pm
by stefp
May be is simple to make button - Filters disabled when option Stream is - View .

Re: How to hide Filters button for restricted users

Posted: Fri May 19, 2017 2:17 am
by rockedge
I have a modification that seems to work on my test system. When a user has Stream ="View" and Events="View" selected and everything else set to "none" there is no access to the filters. change Events="Edit" too allow access.
on my Ubuntu based system --->
open /usr/share/zoneminder/www/skins/classic/views/filter.php

around line 22 find :

Code: Select all

if ( !canView( 'Events' ))
and replace with :

Code: Select all

if ( canView( 'Stream') and canView( 'Events' ) and !canEdit( 'Events'))
It needs some testing.

Re: How to hide Filters button for restricted users

Posted: Fri May 19, 2017 7:09 am
by stefp
On my system work too ,thank you .