mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 11:28:23 -07:00
Merge pull request #431 from DasNerdherder/master
Fixed #415 Non-Admin profile can access Dashboard
This commit is contained in:
commit
a48b9102d8
@ -1124,6 +1124,7 @@ Dashboard.jQueryMobileInit();
|
|||||||
$(document).on('pagebeforeshow', ".page", function () {
|
$(document).on('pagebeforeshow', ".page", function () {
|
||||||
|
|
||||||
var page = $(this);
|
var page = $(this);
|
||||||
|
var pageId = this.id;
|
||||||
|
|
||||||
var userId = Dashboard.getCurrentUserId();
|
var userId = Dashboard.getCurrentUserId();
|
||||||
ApiClient.currentUserId(userId);
|
ApiClient.currentUserId(userId);
|
||||||
@ -1147,6 +1148,8 @@ $(document).on('pagebeforeshow', ".page", function () {
|
|||||||
|
|
||||||
if (user.Configuration.IsAdministrator) {
|
if (user.Configuration.IsAdministrator) {
|
||||||
Dashboard.ensureToolsMenu(page);
|
Dashboard.ensureToolsMenu(page);
|
||||||
|
} else if (pageId == "dashboardPage") {
|
||||||
|
window.location.replace("index.html");
|
||||||
}
|
}
|
||||||
|
|
||||||
Dashboard.ensureHeader(page, user);
|
Dashboard.ensureHeader(page, user);
|
||||||
|
Loading…
Reference in New Issue
Block a user