mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge pull request #431 from DasNerdherder/master
Fixed #415 Non-Admin profile can access Dashboard
This commit is contained in:
commit
a48b9102d8
1 changed files with 3 additions and 0 deletions
|
@ -1124,6 +1124,7 @@ Dashboard.jQueryMobileInit();
|
|||
$(document).on('pagebeforeshow', ".page", function () {
|
||||
|
||||
var page = $(this);
|
||||
var pageId = this.id;
|
||||
|
||||
var userId = Dashboard.getCurrentUserId();
|
||||
ApiClient.currentUserId(userId);
|
||||
|
@ -1147,6 +1148,8 @@ $(document).on('pagebeforeshow', ".page", function () {
|
|||
|
||||
if (user.Configuration.IsAdministrator) {
|
||||
Dashboard.ensureToolsMenu(page);
|
||||
} else if (pageId == "dashboardPage") {
|
||||
window.location.replace("index.html");
|
||||
}
|
||||
|
||||
Dashboard.ensureHeader(page, user);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue