Skip to content

Commit

Permalink
Fix bug #DNN-21129
Browse files Browse the repository at this point in the history
- Possible regression due to DNN-7984
  • Loading branch information
Mohtshum committed Jun 26, 2018
1 parent b5a9a73 commit 39484ba
Showing 1 changed file with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
using ContentDisposition = System.Net.Mime.ContentDisposition;
using FileInfo = DotNetNuke.Services.FileSystem.FileInfo;
using System.Web;
using DotNetNuke.Entities.Tabs;

namespace DotNetNuke.Web.InternalServices
{
Expand Down Expand Up @@ -426,10 +425,19 @@ private static FileUploadDto UploadFile(
}

var folderManager = FolderManager.Instance;
var effectivePortalId = isHostPortal ? Null.NullInteger : portalId;
var folderInfo = folderManager.GetFolder(effectivePortalId, folder);

var effectivePortalId = isHostPortal ? Null.NullInteger : portalId;
int userId;

var folderInfo = folderManager.GetFolder(effectivePortalId, folder);
if (folderInfo == null && IsUserFolder(folder, out userId))
{
var user = UserController.GetUserById(effectivePortalId, userId);
if (user != null)
{
folderInfo = folderManager.GetUserFolder(user);
}
}

if (!FolderPermissionController.HasFolderPermission(portalId, folder, "WRITE")
&& !FolderPermissionController.HasFolderPermission(portalId, folder, "ADD"))
Expand Down

0 comments on commit 39484ba

Please sign in to comment.