Files
Umbraco-CMS/src/Umbraco.Web/Mvc/NotChildAction.cs
Shannon Deminick 2877b7bda4 Fixes: #U4-1819
2013-03-02 05:46:00 +06:00

20 lines
678 B
C#

using System.Web.Mvc;
namespace Umbraco.Web.Mvc
{
/// <summary>
/// Used to ensure that actions with duplicate names that are not child actions don't get executed when
/// we are Posting and not redirecting.
/// </summary>
/// <remarks>
/// See issue: http://issues.umbraco.org/issue/U4-1819
/// </remarks>
public class NotChildAction : ActionMethodSelectorAttribute
{
public override bool IsValidForRequest(ControllerContext controllerContext, System.Reflection.MethodInfo methodInfo)
{
var isChildAction = controllerContext.IsChildAction;
return !isChildAction;
}
}
}