1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Fixed #415 Non-Admin profile can access Dashboard

In site.js, in pagebeforeshow, added logic for when the current user is
not an administrator, if the page is the dashboard, to redirect to
index.html
This commit is contained in:
Christopher Hines 2013-08-20 10:42:07 -04:00
parent 3021d62eb4
commit b1954abc23

View file

@ -1120,6 +1120,7 @@ Dashboard.jQueryMobileInit();
$(document).on('pagebeforeshow', ".page", function () {
var page = $(this);
var pageId = this.id;
var userId = Dashboard.getCurrentUserId();
ApiClient.currentUserId(userId);
@ -1143,6 +1144,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);