mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fixes #316 - Account with "no access to manage" can still manage some things.
This commit is contained in:
parent
beddd5361d
commit
3ba31e9003
1 changed files with 41 additions and 10 deletions
|
@ -143,7 +143,13 @@ var Dashboard = {
|
|||
if (info.HasPendingRestart) {
|
||||
|
||||
Dashboard.hideDashboardVersionWarning();
|
||||
|
||||
Dashboard.getCurrentUser().done(function (currentUser) {
|
||||
|
||||
if (currentUser.Configuration.IsAdministrator) {
|
||||
Dashboard.showServerRestartWarning();
|
||||
}
|
||||
});
|
||||
|
||||
} else {
|
||||
|
||||
|
@ -858,25 +864,50 @@ var Dashboard = {
|
|||
}
|
||||
}
|
||||
else if (msg.MessageType === "PackageInstallationCompleted") {
|
||||
Dashboard.getCurrentUser().done(function (currentUser) {
|
||||
|
||||
if (currentUser.Configuration.IsAdministrator) {
|
||||
Dashboard.showPackageInstallNotification(msg.Data, "completed");
|
||||
Dashboard.refreshSystemInfoFromServer();
|
||||
}
|
||||
});
|
||||
}
|
||||
else if (msg.MessageType === "PackageInstallationFailed") {
|
||||
Dashboard.getCurrentUser().done(function (currentUser) {
|
||||
|
||||
if (currentUser.Configuration.IsAdministrator) {
|
||||
Dashboard.showPackageInstallNotification(msg.Data, "failed");
|
||||
Dashboard.refreshSystemInfoFromServer();
|
||||
}
|
||||
});
|
||||
}
|
||||
else if (msg.MessageType === "PackageInstallationCancelled") {
|
||||
Dashboard.getCurrentUser().done(function (currentUser) {
|
||||
|
||||
if (currentUser.Configuration.IsAdministrator) {
|
||||
Dashboard.showPackageInstallNotification(msg.Data, "cancelled");
|
||||
Dashboard.refreshSystemInfoFromServer();
|
||||
}
|
||||
});
|
||||
}
|
||||
else if (msg.MessageType === "PackageInstalling") {
|
||||
Dashboard.getCurrentUser().done(function (currentUser) {
|
||||
|
||||
if (currentUser.Configuration.IsAdministrator) {
|
||||
Dashboard.showPackageInstallNotification(msg.Data, "progress");
|
||||
Dashboard.refreshSystemInfoFromServer();
|
||||
}
|
||||
});
|
||||
}
|
||||
else if (msg.MessageType === "ScheduledTaskEnded") {
|
||||
|
||||
Dashboard.getCurrentUser().done(function (currentUser) {
|
||||
|
||||
if (currentUser.Configuration.IsAdministrator) {
|
||||
Dashboard.showTaskCompletionNotification(msg.Data);
|
||||
}
|
||||
});
|
||||
}
|
||||
else if (msg.MessageType === "Browse") {
|
||||
|
||||
Dashboard.onBrowseCommand(msg.Data);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue