diff --git a/src/Umbraco.Web/Editors/ContentController.cs b/src/Umbraco.Web/Editors/ContentController.cs
index c13840ea44..354134d78a 100644
--- a/src/Umbraco.Web/Editors/ContentController.cs
+++ b/src/Umbraco.Web/Editors/ContentController.cs
@@ -417,7 +417,7 @@ namespace Umbraco.Web.Editors
///
/// The content to lookup, if the contentItem is not specified
///
- /// Specifies the already resolved content item to check against, setting this ignores the nodeId
+ /// Specifies the already resolved content item to check against
///
internal static bool CheckPermissions(
IDictionary storage,
diff --git a/src/Umbraco.Web/Editors/MediaController.cs b/src/Umbraco.Web/Editors/MediaController.cs
index fef0d4716d..d1e72831ad 100644
--- a/src/Umbraco.Web/Editors/MediaController.cs
+++ b/src/Umbraco.Web/Editors/MediaController.cs
@@ -310,21 +310,22 @@ namespace Umbraco.Web.Editors
///
internal static bool CheckPermissions(IDictionary storage, IUser user, IMediaService mediaService, int nodeId, IMedia media = null)
{
- if (nodeId != Constants.System.Root)
+ if (media == null && nodeId != Constants.System.Root)
{
-
-
- var contentItem = mediaService.GetById(nodeId);
- if (contentItem == null)
+ media = mediaService.GetById(nodeId);
+ //put the content item into storage so it can be retreived
+ // in the controller (saves a lookup)
+ storage[typeof(IMedia).ToString()] = media;
+ }
+
+ if (media == null && nodeId != Constants.System.Root)
{
throw new HttpResponseException(HttpStatusCode.NotFound);
}
- //put the content item into storage so it can be retreived
- // in the controller (saves a lookup)
- storage.Add(typeof(IMedia).ToString(), contentItem);
-
- var hasPathAccess = user.HasPathAccess(contentItem);
+ var hasPathAccess = (nodeId == Constants.System.Root)
+ ? UserExtensions.HasPathAccess("-1", user.StartMediaId, Constants.System.RecycleBinMedia)
+ : user.HasPathAccess(media);
return hasPathAccess;
}