webdav portal auth via ad
This commit is contained in:
parent
05d9fddb5d
commit
7dd090820b
56 changed files with 927 additions and 281 deletions
|
@ -0,0 +1,16 @@
|
|||
using System.Configuration;
|
||||
|
||||
namespace WebsitePanel.WebDav.Core.Config.WebConfigSections
|
||||
{
|
||||
public class ApplicationNameElement : ConfigurationElement
|
||||
{
|
||||
private const string ValueKey = "value";
|
||||
|
||||
[ConfigurationProperty(ValueKey, IsKey = true, IsRequired = true)]
|
||||
public string Value
|
||||
{
|
||||
get { return (string)this[ValueKey]; }
|
||||
set { this[ValueKey] = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace WebsitePanel.WebDav.Core.Config.WebConfigSections
|
||||
{
|
||||
public class AuthTimeoutCookieNameElement : ConfigurationElement
|
||||
{
|
||||
private const string ValueKey = "value";
|
||||
|
||||
[ConfigurationProperty(ValueKey, IsKey = true, IsRequired = true)]
|
||||
public string Value
|
||||
{
|
||||
get { return (string)this[ValueKey]; }
|
||||
set { this[ValueKey] = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
using System.Configuration;
|
||||
|
||||
namespace WebsitePanel.WebDav.Core.Config.WebConfigSections
|
||||
{
|
||||
public class ElementsRenderingElement : ConfigurationElement
|
||||
{
|
||||
private const string DefaultCountKey = "defaultCount";
|
||||
private const string AddElementsCountKey = "addElementsCount";
|
||||
private const string ElementsToIgnoreKey = "elementsToIgnoreKey";
|
||||
|
||||
[ConfigurationProperty(DefaultCountKey, IsKey = true, IsRequired = true, DefaultValue = 30)]
|
||||
public int DefaultCount
|
||||
{
|
||||
get { return (int)this[DefaultCountKey]; }
|
||||
set { this[DefaultCountKey] = value; }
|
||||
}
|
||||
|
||||
[ConfigurationProperty(AddElementsCountKey, IsKey = true, IsRequired = true, DefaultValue = 20)]
|
||||
public int AddElementsCount
|
||||
{
|
||||
get { return (int)this[AddElementsCountKey]; }
|
||||
set { this[AddElementsCountKey] = value; }
|
||||
}
|
||||
|
||||
[ConfigurationProperty(ElementsToIgnoreKey, IsKey = true, IsRequired = true, DefaultValue = "")]
|
||||
public string ElementsToIgnore
|
||||
{
|
||||
get { return (string)this[ElementsToIgnoreKey]; }
|
||||
set { this[ElementsToIgnoreKey] = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
using System.Configuration;
|
||||
|
||||
namespace WebsitePanel.WebDav.Core.Config.WebConfigSections
|
||||
{
|
||||
public class FileIconsElement : ConfigurationElement
|
||||
{
|
||||
private const string ExtensionKey = "extension";
|
||||
private const string PathKey = "path";
|
||||
|
||||
[ConfigurationProperty(ExtensionKey, IsKey = true, IsRequired = true)]
|
||||
public string Extension
|
||||
{
|
||||
get { return (string) this[ExtensionKey]; }
|
||||
set { this[ExtensionKey] = value; }
|
||||
}
|
||||
|
||||
[ConfigurationProperty(PathKey, IsKey = true, IsRequired = true)]
|
||||
public string Path
|
||||
{
|
||||
get { return (string) this[PathKey]; }
|
||||
set { this[PathKey] = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
using System.Configuration;
|
||||
|
||||
namespace WebsitePanel.WebDav.Core.Config.WebConfigSections
|
||||
{
|
||||
[ConfigurationCollection(typeof (FileIconsElement))]
|
||||
public class FileIconsElementCollection : ConfigurationElementCollection
|
||||
{
|
||||
private const string DefaultPathKey = "defaultPath";
|
||||
|
||||
[ConfigurationProperty(DefaultPathKey, IsRequired = false, DefaultValue = "/")]
|
||||
public string DefaultPath
|
||||
{
|
||||
get { return (string) this[DefaultPathKey]; }
|
||||
set { this[DefaultPathKey] = value; }
|
||||
}
|
||||
|
||||
protected override ConfigurationElement CreateNewElement()
|
||||
{
|
||||
return new FileIconsElement();
|
||||
}
|
||||
|
||||
protected override object GetElementKey(ConfigurationElement element)
|
||||
{
|
||||
return ((FileIconsElement) element).Extension;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
using System.Configuration;
|
||||
|
||||
namespace WebsitePanel.WebDavPortal.WebConfigSections
|
||||
{
|
||||
public class OfficeOnlineElement : ConfigurationElement
|
||||
{
|
||||
private const string ExtensionKey = "extension";
|
||||
|
||||
[ConfigurationProperty(ExtensionKey, IsKey = true, IsRequired = true)]
|
||||
public string Extension
|
||||
{
|
||||
get { return this[ExtensionKey].ToString(); }
|
||||
set { this[ExtensionKey] = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
using System;
|
||||
using System.Configuration;
|
||||
|
||||
namespace WebsitePanel.WebDavPortal.WebConfigSections
|
||||
{
|
||||
[ConfigurationCollection(typeof(OfficeOnlineElement))]
|
||||
public class OfficeOnlineElementCollection : ConfigurationElementCollection
|
||||
{
|
||||
private const string UrlKey = "url";
|
||||
private const string IsEnabledKey = "isEnabled";
|
||||
|
||||
[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; }
|
||||
}
|
||||
|
||||
protected override ConfigurationElement CreateNewElement()
|
||||
{
|
||||
return new OfficeOnlineElement();
|
||||
}
|
||||
|
||||
protected override object GetElementKey(ConfigurationElement element)
|
||||
{
|
||||
return ((OfficeOnlineElement)element).Extension;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
using System.Configuration;
|
||||
|
||||
namespace WebsitePanel.WebDavPortal.WebConfigSections
|
||||
{
|
||||
public class SessionKeysElement : ConfigurationElement
|
||||
{
|
||||
private const string KeyKey = "key";
|
||||
private const string ValueKey = "value";
|
||||
|
||||
public const string AccountInfoKey = "AccountInfoSessionKey";
|
||||
public const string AuthTicketKey = "AuthTicketKey";
|
||||
public const string WebDavManagerKey = "WebDavManagerSessionKey";
|
||||
public const string ResourseRenderCountKey = "ResourseRenderCountSessionKey";
|
||||
public const string ItemIdSessionKey = "ItemId";
|
||||
|
||||
[ConfigurationProperty(KeyKey, IsKey = true, IsRequired = true)]
|
||||
public string Key
|
||||
{
|
||||
get { return (string) this[KeyKey]; }
|
||||
set { this[KeyKey] = value; }
|
||||
}
|
||||
|
||||
[ConfigurationProperty(ValueKey, IsKey = true, IsRequired = true)]
|
||||
public string Value
|
||||
{
|
||||
get { return (string) this[ValueKey]; }
|
||||
set { this[ValueKey] = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
using System.Configuration;
|
||||
using WebsitePanel.WebDavPortal.WebConfigSections;
|
||||
|
||||
namespace WebsitePanel.WebDav.Core.Config.WebConfigSections
|
||||
{
|
||||
[ConfigurationCollection(typeof (SessionKeysElement))]
|
||||
public class SessionKeysElementCollection : ConfigurationElementCollection
|
||||
{
|
||||
protected override ConfigurationElement CreateNewElement()
|
||||
{
|
||||
return new SessionKeysElement();
|
||||
}
|
||||
|
||||
protected override object GetElementKey(ConfigurationElement element)
|
||||
{
|
||||
return ((SessionKeysElement) element).Key;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
using System.Configuration;
|
||||
|
||||
namespace WebsitePanel.WebDav.Core.Config.WebConfigSections
|
||||
{
|
||||
public class UserDomainElement : ConfigurationElement
|
||||
{
|
||||
private const string ValueKey = "value";
|
||||
|
||||
[ConfigurationProperty(ValueKey, IsKey = true, IsRequired = true)]
|
||||
public string Value
|
||||
{
|
||||
get { return (string) this[ValueKey]; }
|
||||
set { this[ValueKey] = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,77 @@
|
|||
using System.Configuration;
|
||||
using WebsitePanel.WebDav.Core.Config.WebConfigSections;
|
||||
|
||||
namespace WebsitePanel.WebDavPortal.WebConfigSections
|
||||
{
|
||||
public class WebDavExplorerConfigurationSettingsSection : ConfigurationSection
|
||||
{
|
||||
private const string UserDomainKey = "userDomain";
|
||||
private const string AuthTimeoutCookieNameKey = "authTimeoutCookieName";
|
||||
private const string AppName = "applicationName";
|
||||
private const string WebsitePanelConstantUserKey = "websitePanelConstantUser";
|
||||
private const string ElementsRenderingKey = "elementsRendering";
|
||||
private const string Rfc2898CryptographyKey = "rfc2898Cryptography";
|
||||
private const string ConnectionStringsKey = "appConnectionStrings";
|
||||
private const string SessionKeysKey = "sessionKeys";
|
||||
private const string FileIconsKey = "fileIcons";
|
||||
private const string OfficeOnlineKey = "officeOnline";
|
||||
|
||||
public const string SectionName = "webDavExplorerConfigurationSettings";
|
||||
|
||||
[ConfigurationProperty(AuthTimeoutCookieNameKey, IsRequired = true)]
|
||||
public AuthTimeoutCookieNameElement AuthTimeoutCookieName
|
||||
{
|
||||
get { return (AuthTimeoutCookieNameElement)this[AuthTimeoutCookieNameKey]; }
|
||||
set { this[AuthTimeoutCookieNameKey] = value; }
|
||||
}
|
||||
|
||||
[ConfigurationProperty(UserDomainKey, IsRequired = true)]
|
||||
public UserDomainElement UserDomain
|
||||
{
|
||||
get { return (UserDomainElement) this[UserDomainKey]; }
|
||||
set { this[UserDomainKey] = value; }
|
||||
}
|
||||
|
||||
[ConfigurationProperty(AppName, IsRequired = true)]
|
||||
public ApplicationNameElement ApplicationName
|
||||
{
|
||||
get { return (ApplicationNameElement)this[AppName]; }
|
||||
set { this[AppName] = value; }
|
||||
}
|
||||
|
||||
[ConfigurationProperty(WebsitePanelConstantUserKey, IsRequired = true)]
|
||||
public WebsitePanelConstantUserElement WebsitePanelConstantUser
|
||||
{
|
||||
get { return (WebsitePanelConstantUserElement)this[WebsitePanelConstantUserKey]; }
|
||||
set { this[WebsitePanelConstantUserKey] = value; }
|
||||
}
|
||||
|
||||
[ConfigurationProperty(ElementsRenderingKey, IsRequired = true)]
|
||||
public ElementsRenderingElement ElementsRendering
|
||||
{
|
||||
get { return (ElementsRenderingElement)this[ElementsRenderingKey]; }
|
||||
set { this[ElementsRenderingKey] = value; }
|
||||
}
|
||||
|
||||
[ConfigurationProperty(SessionKeysKey, IsDefaultCollection = false)]
|
||||
public SessionKeysElementCollection SessionKeys
|
||||
{
|
||||
get { return (SessionKeysElementCollection) this[SessionKeysKey]; }
|
||||
set { this[SessionKeysKey] = value; }
|
||||
}
|
||||
|
||||
[ConfigurationProperty(FileIconsKey, IsDefaultCollection = false)]
|
||||
public FileIconsElementCollection FileIcons
|
||||
{
|
||||
get { return (FileIconsElementCollection) this[FileIconsKey]; }
|
||||
set { this[FileIconsKey] = value; }
|
||||
}
|
||||
|
||||
[ConfigurationProperty(OfficeOnlineKey, IsDefaultCollection = false)]
|
||||
public OfficeOnlineElementCollection OfficeOnline
|
||||
{
|
||||
get { return (OfficeOnlineElementCollection)this[OfficeOnlineKey]; }
|
||||
set { this[OfficeOnlineKey] = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
using System.Configuration;
|
||||
|
||||
namespace WebsitePanel.WebDav.Core.Config.WebConfigSections
|
||||
{
|
||||
public class WebsitePanelConstantUserElement : ConfigurationElement
|
||||
{
|
||||
private const string LoginKey = "login";
|
||||
private const string PasswordKey = "password";
|
||||
|
||||
[ConfigurationProperty(LoginKey, IsKey = true, IsRequired = true)]
|
||||
public string Login
|
||||
{
|
||||
get { return this[LoginKey].ToString(); }
|
||||
set { this[LoginKey] = value; }
|
||||
}
|
||||
|
||||
[ConfigurationProperty(PasswordKey, IsKey = true, IsRequired = true)]
|
||||
public string Password
|
||||
{
|
||||
get { return this[PasswordKey].ToString(); }
|
||||
set { this[PasswordKey] = value; }
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue