OWA settings added to control panel
This commit is contained in:
parent
9bce727a65
commit
ffed3b1350
9 changed files with 128 additions and 31 deletions
|
@ -1,6 +1,7 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using WebsitePanel.EnterpriseServer;
|
||||
using WebsitePanel.WebDavPortal.WebConfigSections;
|
||||
|
||||
namespace WebsitePanel.WebDav.Core.Config.Entities
|
||||
|
@ -11,15 +12,30 @@ namespace WebsitePanel.WebDav.Core.Config.Entities
|
|||
|
||||
public OfficeOnlineCollection()
|
||||
{
|
||||
IsEnabled = ConfigSection.OfficeOnline.IsEnabled;
|
||||
Url = ConfigSection.OfficeOnline.Url;
|
||||
NewFilePath = ConfigSection.OfficeOnline.CobaltNewFilePath;
|
||||
CobaltFileTtl = ConfigSection.OfficeOnline.CobaltFileTtl;
|
||||
_officeExtensions = ConfigSection.OfficeOnline.Cast<OfficeOnlineElement>().ToList();
|
||||
}
|
||||
|
||||
public bool IsEnabled { get; private set; }
|
||||
public string Url { get; private set; }
|
||||
public bool IsEnabled {
|
||||
get
|
||||
{
|
||||
return GetWebdavSystemSettigns().GetValueOrDefault(EnterpriseServer.SystemSettings.WEBDAV_OWA_ENABLED_KEY, false);
|
||||
}
|
||||
}
|
||||
public string Url
|
||||
{
|
||||
get
|
||||
{
|
||||
return GetWebdavSystemSettigns().GetValueOrDefault(EnterpriseServer.SystemSettings.WEBDAV_OWA_URL, string.Empty);
|
||||
}
|
||||
}
|
||||
|
||||
private SystemSettings GetWebdavSystemSettigns()
|
||||
{
|
||||
return WspContext.Services.Organizations.GetWebDavSystemSettings() ?? new SystemSettings();
|
||||
}
|
||||
|
||||
public string NewFilePath { get; private set; }
|
||||
public int CobaltFileTtl { get; private set; }
|
||||
|
||||
|
|
|
@ -6,25 +6,9 @@ namespace WebsitePanel.WebDavPortal.WebConfigSections
|
|||
[ConfigurationCollection(typeof(OfficeOnlineElement))]
|
||||
public class OfficeOnlineElementCollection : ConfigurationElementCollection
|
||||
{
|
||||
private const string UrlKey = "url";
|
||||
private const string IsEnabledKey = "isEnabled";
|
||||
private const string CobaltFileTtlKey = "cobaltFileTtl";
|
||||
private const string CobaltNewFilePathKey = "cobaltNewFilePath";
|
||||
|
||||
[ConfigurationProperty(UrlKey, IsKey = true, IsRequired = true)]
|
||||
public string Url
|
||||
{
|
||||
get { return this[UrlKey].ToString(); }
|
||||
set { this[UrlKey] = value; }
|
||||
}
|
||||
|
||||
[ConfigurationProperty(IsEnabledKey, IsKey = true, IsRequired = true, DefaultValue = false)]
|
||||
public bool IsEnabled
|
||||
{
|
||||
get { return Boolean.Parse(this[IsEnabledKey].ToString()); }
|
||||
set { this[IsEnabledKey] = value; }
|
||||
}
|
||||
|
||||
[ConfigurationProperty(CobaltNewFilePathKey, IsKey = true, IsRequired = true)]
|
||||
public string CobaltNewFilePath
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue