Allow users with Monitors::View to generate and cancel events
This commit is contained in:
parent
6682ec7da5
commit
c9170a87b2
|
@ -179,11 +179,11 @@ bool ValidateAccess(User *user, int mon_id, int function) {
|
|||
if ( user->getEvents() < User::PERM_VIEW )
|
||||
allowed = false;
|
||||
}
|
||||
if ( function & (ZMU_ZONES|ZMU_QUERY|ZMU_LIST) ) {
|
||||
if ( function & (ZMU_ZONES|ZMU_QUERY|ZMU_LIST|ZMU_ALARM|ZMU_CANCEL) ) {
|
||||
if ( user->getMonitors() < User::PERM_VIEW )
|
||||
allowed = false;
|
||||
}
|
||||
if ( function & (ZMU_ALARM|ZMU_NOALARM|ZMU_CANCEL|ZMU_RELOAD|ZMU_ENABLE|ZMU_DISABLE|ZMU_SUSPEND|ZMU_RESUME|ZMU_BRIGHTNESS|ZMU_CONTRAST|ZMU_HUE|ZMU_COLOUR) ) {
|
||||
if ( function & (ZMU_NOALARM|ZMU_RELOAD|ZMU_ENABLE|ZMU_DISABLE|ZMU_SUSPEND|ZMU_RESUME|ZMU_BRIGHTNESS|ZMU_CONTRAST|ZMU_HUE|ZMU_COLOUR) ) {
|
||||
if ( user->getMonitors() < User::PERM_EDIT )
|
||||
allowed = false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue