Page 1 of 1

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

Posted: Sat Feb 13, 2010 4:38 pm
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.