websitepanel/WebsitePanel/Sources/WebsitePanel.WebDavPortal/CustomAttributes/LdapAuthorizationAttribute.cs
2015-01-13 04:18:56 -08:00

18 lines
No EOL
578 B
C#

using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
using Ninject;
using WebsitePanel.WebDavPortal.DependencyInjection;
using WebsitePanel.WebDavPortal.Models;
using WebsitePanel.WebDavPortal.UI.Routes;
namespace WebsitePanel.WebDavPortal.CustomAttributes
{
public class LdapAuthorizationAttribute : AuthorizeAttribute
{
protected override void HandleUnauthorizedRequest(AuthorizationContext filterContext)
{
filterContext.Result = new RedirectToRouteResult(AccountRouteNames.Login, null);
}
}
}