Skip to content

Commit

Permalink
U4-10519 Legacy create is broken
Browse files Browse the repository at this point in the history
  • Loading branch information
Shazwazza committed Oct 13, 2017
1 parent c5f4793 commit 62ce7f6
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/Umbraco.Web/UI/LegacyDialogHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,10 @@ internal static bool UserHasCreateAccess(HttpContextBase httpContext, User umbra
{
var task = GetTaskForOperation(httpContext, umbracoUser, Operation.Create, nodeType);
if (task == null)
throw new InvalidOperationException(
string.Format("Could not task for operation {0} for node type {1}", Operation.Create, nodeType));
{
//if no task was found it will use the default task and we cannot validate the application assigned so return true
return true;
}

var dialogTask = task as LegacyDialogTask;
if (dialogTask != null)
Expand All @@ -154,8 +156,10 @@ internal static bool UserHasDeleteAccess(HttpContextBase httpContext, User umbra
{
var task = GetTaskForOperation(httpContext, umbracoUser, Operation.Delete, nodeType);
if (task == null)
throw new InvalidOperationException(
string.Format("Could not task for operation {0} for node type {1}", Operation.Delete, nodeType));
{
//if no task was found it will use the default task and we cannot validate the application assigned so return true
return true;
}

var dialogTask = task as LegacyDialogTask;
if (dialogTask != null)
Expand Down

0 comments on commit 62ce7f6

Please sign in to comment.