ensure the user cannot access the media list dashboard if they don't have root access
This commit is contained in:
@@ -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]));
|
||||
}
|
||||
|
||||
@@ -37,10 +37,16 @@ namespace Umbraco.Web.Models.ContentEditing
|
||||
/// </summary>
|
||||
[DataMember(Name = "remainingAuthSeconds")]
|
||||
public double SecondsUntilTimeout { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// The user's calculated start nodes based on the start nodes they have assigned directly to them and via the groups they're assigned to
|
||||
/// </summary>
|
||||
[DataMember(Name = "startContentIds")]
|
||||
public int[] StartContentIds { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// The user's calculated start nodes based on the start nodes they have assigned directly to them and via the groups they're assigned to
|
||||
/// </summary>
|
||||
[DataMember(Name = "startMediaIds")]
|
||||
public int[] StartMediaIds { get; set; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user