mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
add user permissions for managing tv recordings
This commit is contained in:
parent
fe3c35efdb
commit
7d9325b1b2
4 changed files with 28 additions and 6 deletions
11
ApiClient.js
11
ApiClient.js
|
@ -378,6 +378,17 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi
|
|||
});
|
||||
};
|
||||
|
||||
self.getAuthorizedFeatures = function (options) {
|
||||
|
||||
var url = self.getUrl("Users/AuthorizedFeatures", options || {});
|
||||
|
||||
return self.ajax({
|
||||
type: "GET",
|
||||
url: url,
|
||||
dataType: "json"
|
||||
});
|
||||
};
|
||||
|
||||
self.getLiveTvServices = function (options) {
|
||||
|
||||
var url = self.getUrl("LiveTv/Services", options || {});
|
||||
|
|
|
@ -4,12 +4,12 @@
|
|||
|
||||
if (!loggedInUser.Configuration.IsAdministrator) {
|
||||
$('#fldIsAdmin', page).hide();
|
||||
$('#fldEnableRemoteControlOtherUsers', page).hide();
|
||||
$('#featureAccessFields', page).hide();
|
||||
$('#accessControlDiv', page).hide();
|
||||
} else {
|
||||
$('#accessControlDiv', page).show();
|
||||
$('#fldIsAdmin', page).show();
|
||||
$('#fldEnableRemoteControlOtherUsers', page).show();
|
||||
$('#featureAccessFields', page).show();
|
||||
}
|
||||
|
||||
Dashboard.setPageTitle(user.Name || "Add User");
|
||||
|
@ -23,6 +23,8 @@
|
|||
$('#chkIsHidden', page).checked(user.Configuration.IsHidden || false).checkboxradio("refresh");
|
||||
$('#chkEnableRemoteControlOtherUsers', page).checked(user.Configuration.EnableRemoteControlOfOtherUsers || false).checkboxradio("refresh");
|
||||
|
||||
$('#chkManageLiveTv', page).checked(user.Configuration.EnableLiveTvManagement || false).checkboxradio("refresh");
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
}
|
||||
|
||||
|
@ -52,6 +54,7 @@
|
|||
user.Configuration.IsHidden = $('#chkIsHidden', page).checked();
|
||||
user.Configuration.IsDisabled = $('#chkDisabled', page).checked();
|
||||
user.Configuration.EnableRemoteControlOfOtherUsers = $('#chkEnableRemoteControlOtherUsers', page).checked();
|
||||
user.Configuration.EnableLiveTvManagement = $('#chkManageLiveTv', page).checked();
|
||||
|
||||
var userId = getParameterByName("userId");
|
||||
|
||||
|
|
|
@ -25,11 +25,19 @@
|
|||
<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;">
|
||||
</ul>
|
||||
<div id="featureAccessFields">
|
||||
<h2>Feature Access</h2>
|
||||
<div>
|
||||
<input type="checkbox" id="chkEnableRemoteControlOtherUsers" name="chkEnableRemoteControlOtherUsers" />
|
||||
<label for="chkEnableRemoteControlOtherUsers">Allow this user to remote control other users</label>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div>
|
||||
<input type="checkbox" id="chkManageLiveTv" name="chkManageLiveTv" />
|
||||
<label for="chkManageLiveTv">Manage live tv recordings</label>
|
||||
</div>
|
||||
<br />
|
||||
</div>
|
||||
<div id="accessControlDiv" style="display: none" data-role="collapsible">
|
||||
<h2>Advanced Control</h2>
|
||||
<div id="fldIsEnabled" style="margin: 1em 0 2em;">
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="MediaBrowser.ApiClient.Javascript" version="3.0.226" targetFramework="net45" />
|
||||
<package id="MediaBrowser.ApiClient.Javascript" version="3.0.228" targetFramework="net45" />
|
||||
</packages>
|
Loading…
Add table
Add a link
Reference in a new issue