[FIX] ZM 1.24.2: Marking a monitor from a restricted user

If you've made a patch to quick fix a bug or to add a new feature not yet in the main tree then post it here so others can try it out.
Post Reply
mastertheknife
Posts: 678
Joined: Wed Dec 16, 2009 4:32 pm
Location: Israel

[FIX] ZM 1.24.2: Marking a monitor from a restricted user

Post by mastertheknife »

How to reproduce:
1) Create a user with monitors edit privilege, but restrict him to a monitor or a few.
2) Login with that user and go to console page (main page)
3) Try to mark a monitor to edit it or delete it. You can't mark it unless you remove the monitor restrictions (unselect all monitors with Ctrl) for that user.
Bug was found by j1mw3b, see here for more information: http://www.zoneminder.com/forums/viewtopic.php?p=59562

In file skins/classic/views/console.php, edit the following, which starts at around line 333 (May vary from installation to installation)
Change it from:

Code: Select all

<td class="colMark"><input type="checkbox" name="markMids[]" value="<?= $monitor['Id'] ?>" onclick="setButtonStates( this )"<?php if ( !canEdit( 'Monitors' ) || $user['MonitorIds'] ) {?> disabled="disabled"<?php } ?>/></td>
To:

Code: Select all

<td class="colMark"><input type="checkbox" name="markMids[]" value="<?= $monitor['Id'] ?>" onclick="setButtonStates( this )"<?php if ( !canEdit( 'Monitors' ) ) {?> disabled="disabled"<?php } ?>/></td>
mastertheknife.
Post Reply