webdav portal auth via ad
This commit is contained in:
parent
05d9fddb5d
commit
7dd090820b
56 changed files with 927 additions and 281 deletions
|
@ -10,18 +10,6 @@ namespace WebsitePanel.WebDavPortal.CustomAttributes
|
|||
{
|
||||
public class LdapAuthorizationAttribute : AuthorizeAttribute
|
||||
{
|
||||
protected override bool AuthorizeCore(HttpContextBase httpContext)
|
||||
{
|
||||
var accountInfo = DependencyResolver.Current.GetService<AccountModel>();
|
||||
|
||||
if (accountInfo == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void HandleUnauthorizedRequest(AuthorizationContext filterContext)
|
||||
{
|
||||
filterContext.Result = new RedirectToRouteResult(AccountRouteNames.Login, null);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue