webdav portal owa editing alpha
This commit is contained in:
parent
7aa68cd775
commit
aedc7ec08e
33 changed files with 969 additions and 153 deletions
|
@ -1,34 +0,0 @@
|
|||
using Ninject;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Routing;
|
||||
using WebsitePanel.WebDav.Core;
|
||||
using WebsitePanel.WebDavPortal.DependencyInjection;
|
||||
using WebsitePanel.WebDavPortal.Models;
|
||||
|
||||
namespace WebsitePanel.WebDavPortal.Constraints
|
||||
{
|
||||
public class OrganizationRouteConstraint : IRouteConstraint
|
||||
{
|
||||
public bool Match(HttpContextBase httpContext, Route route, string parameterName, RouteValueDictionary values, RouteDirection routeDirection)
|
||||
{
|
||||
if (WspContext.User == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
object value;
|
||||
if (!values.TryGetValue(parameterName, out value))
|
||||
return false;
|
||||
|
||||
var str = value as string;
|
||||
if (str == null)
|
||||
return false;
|
||||
|
||||
return WspContext.User.OrganizationId == str;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue