Before RC1 we did something like this:
public void OnAuthorization(AuthorizationContext filterContext)
{
if (whatever)
{
filterContext.Cancel();
}
}
This is gone now, how do we achieve the same results with RC1?
Thanks,
Kyle
Instead of a
Cancel
property you just need to set theActionResult
to a different result. So for theCancel
property, you just have to replace yourCancel=true
withREFERENCE
Breaking Changes for RC1:
AuthorizationContext
- no longer has aCancel
propertyUpdateModel
- no longer accepts aFormCollection
UrlHelper
- no longer accepts aViewContext
Scotts Blog with the White Papers of RC1 changes.