ensure the user cannot access the media list dashboard if they don't have root access

This commit is contained in:
Shannon
2017-07-31 16:03:31 +10:00
parent 6de2cea9c5
commit b20e3c7435
2 changed files with 11 additions and 5 deletions

View File

@@ -278,8 +278,8 @@ function MediaFolderBrowserDashboardController($rootScope, $scope, $location, co
currentUser = user;
// check if the user start node is the dashboard
if (currentUser.startMediaIds.length === 0 || currentUser.startMediaIds.indexOf(-1) >= 0) {
// check if the user has access to the root which they will require to see this dashboard
if (currentUser.startMediaIds.indexOf(-1) >= 0) {
//get the system media listview
contentTypeResource.getPropertyTypeScaffold(-96)
@@ -303,7 +303,7 @@ function MediaFolderBrowserDashboardController($rootScope, $scope, $location, co
});
} else {
} else if (currentUser.startMediaIds.length > 0){
// redirect to start node
$location.path("/media/media/edit/" + (currentUser.startMediaIds.length === 0 ? -1 : currentUser.startMediaIds[0]));
}