webdav portal owa support check added
This commit is contained in:
parent
5795ffb0bc
commit
010c258502
16 changed files with 246 additions and 20 deletions
|
@ -1,5 +1,7 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Web;
|
||||
using WebsitePanel.WebDav.Core.Config;
|
||||
using WebsitePanel.WebDavPortal.Extensions;
|
||||
|
||||
|
@ -20,10 +22,23 @@ namespace WebsitePanel.WebDavPortal.FileOperations
|
|||
get
|
||||
{
|
||||
FileOpenerType result;
|
||||
if (_operationTypes.TryGetValue(fileExtension, out result))
|
||||
if (_operationTypes.TryGetValue(fileExtension, out result) && CheckBrowserSupport())
|
||||
return result;
|
||||
return FileOpenerType.Download;
|
||||
}
|
||||
}
|
||||
|
||||
private bool CheckBrowserSupport()
|
||||
{
|
||||
var request = HttpContext.Current.Request;
|
||||
int supportedVersion;
|
||||
|
||||
if (WebDavAppConfigManager.Instance.OwaSupportedBrowsers.TryGetValue(request.Browser.Browser, out supportedVersion) == false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return supportedVersion <= request.Browser.MajorVersion;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue