fixes #566 - Add permission configuration for remote control

This commit is contained in:
Luke Pulverenti 2013-10-30 11:55:55 -04:00
parent 30dd80deae
commit 0b982de081
2 changed files with 8 additions and 0 deletions

View File

@ -25,6 +25,10 @@
<input type="checkbox" id="chkIsAdmin" name="chkIsAdmin" />
<label for="chkIsAdmin">Allow this user to manage the server</label>
</li>
<li id="fldEnableRemoteControlOtherUsers" style="display: none;">
<input type="checkbox" id="chkEnableRemoteControlOtherUsers" name="chkEnableRemoteControlOtherUsers" />
<label for="chkEnableRemoteControlOtherUsers">Allow this user to remote control sessions from other users</label>
</li>
</ul>
<div id="accessControlDiv" style="display: none">
<h2>Access Control</h2>

View File

@ -43,11 +43,13 @@
if (!loggedInUser.Configuration.IsAdministrator) {
$('#parentalControlDiv', page).hide();
$('#fldIsAdmin', page).hide();
$('#fldEnableRemoteControlOtherUsers', page).hide();
$('#accessControlDiv', page).hide();
} else {
$('#parentalControlDiv', page).show();
$('#accessControlDiv', page).show();
$('#fldIsAdmin', page).show();
$('#fldEnableRemoteControlOtherUsers', page).show();
}
Dashboard.setPageTitle(user.Name || "Add User");
@ -80,6 +82,7 @@
$('#chkDisabled', page).checked(user.Configuration.IsDisabled || false).checkboxradio("refresh");
$('#chkIsHidden', page).checked(user.Configuration.IsHidden || false).checkboxradio("refresh");
$('#chkEnableRemoteControlOtherUsers', page).checked(user.Configuration.EnableRemoteControlOfOtherUsers || false).checkboxradio("refresh");
Dashboard.hideLoadingMsg();
}
@ -110,6 +113,7 @@
user.Configuration.IsHidden = $('#chkIsHidden', page).checked();
user.Configuration.IsDisabled = $('#chkDisabled', page).checked();
user.Configuration.EnableRemoteControlOfOtherUsers = $('#chkEnableRemoteControlOtherUsers', page).checked();
var userId = getParameterByName("userId");