chagnes IsAuthenticated to not return a 403 so the warning msg doesn't display.

This commit is contained in:
Shannon
2013-10-02 09:53:58 +10:00
parent bad4d0c6e6
commit 65f809a0fb

View File

@@ -44,10 +44,11 @@ namespace Umbraco.Web.Editors
{
return Request.CreateResponse(HttpStatusCode.OK);
}
//return Forbidden (403), we don't want to return a 401 because that get's intercepted
//return BadRequest (400), we don't want to return a 401 because that get's intercepted
// by our angular helper because it thinks that we need to re-perform the request once we are
// authorized.
return Request.CreateResponse(HttpStatusCode.Forbidden);
// authorized and we don't want to return a 403 because angular will show a warning msg indicating
// that the user doesn't have access to perform this function, we just want to return a normal invalid msg.
return Request.CreateResponse(HttpStatusCode.BadRequest);
}