Files
Umbraco-CMS/src/Umbraco.Core/Configuration/UmbracoSettings/SecurityElement.cs
Shannon 1361e017a2 Merge branch 'u4-222' of https://github.com/AndyButland/Umbraco-CMS into AndyButland-u4-222
Conflicts:
	src/Umbraco.Core/Security/BackOfficeUserManager.cs
	src/Umbraco.Web.UI.Client/src/less/pages/login.less
	src/Umbraco.Web.UI.Client/src/routes.js
	src/Umbraco.Web.UI.Client/src/views/common/dialogs/login.controller.js
	src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml
	src/Umbraco.Web.UI/web.Template.config
	src/Umbraco.Web/Editors/AuthenticationController.cs
	src/Umbraco.Web/Editors/BackOfficeController.cs
	src/Umbraco.Web/Umbraco.Web.csproj
2016-04-12 18:07:25 +02:00

92 lines
3.0 KiB
C#

using System.Configuration;
namespace Umbraco.Core.Configuration.UmbracoSettings
{
internal class SecurityElement : ConfigurationElement, ISecuritySection
{
[ConfigurationProperty("keepUserLoggedIn")]
internal InnerTextConfigurationElement<bool> KeepUserLoggedIn
{
get
{
return new OptionalInnerTextConfigurationElement<bool>(
(InnerTextConfigurationElement<bool>)this["keepUserLoggedIn"],
//set the default
true);
}
}
[ConfigurationProperty("hideDisabledUsersInBackoffice")]
internal InnerTextConfigurationElement<bool> HideDisabledUsersInBackoffice
{
get
{
return new OptionalInnerTextConfigurationElement<bool>(
(InnerTextConfigurationElement<bool>)this["hideDisabledUsersInBackoffice"],
//set the default
false);
}
}
[ConfigurationProperty("allowPasswordReset")]
internal InnerTextConfigurationElement<bool> AllowPasswordReset
{
get
{
return new OptionalInnerTextConfigurationElement<bool>(
(InnerTextConfigurationElement<bool>)this["allowPasswordReset"],
//set the default
true);
}
}
[ConfigurationProperty("authCookieName")]
internal InnerTextConfigurationElement<string> AuthCookieName
{
get
{
return new OptionalInnerTextConfigurationElement<string>(
(InnerTextConfigurationElement<string>)this["authCookieName"],
//set the default
Constants.Web.AuthCookieName);
}
}
[ConfigurationProperty("authCookieDomain")]
internal InnerTextConfigurationElement<string> AuthCookieDomain
{
get
{
return new OptionalInnerTextConfigurationElement<string>(
(InnerTextConfigurationElement<string>)this["authCookieDomain"],
//set the default
null);
}
}
bool ISecuritySection.KeepUserLoggedIn
{
get { return KeepUserLoggedIn; }
}
bool ISecuritySection.HideDisabledUsersInBackoffice
{
get { return HideDisabledUsersInBackoffice; }
}
bool ISecuritySection.AllowPasswordReset
{
get { return AllowPasswordReset; }
}
string ISecuritySection.AuthCookieName
{
get { return AuthCookieName; }
}
string ISecuritySection.AuthCookieDomain
{
get { return AuthCookieDomain; }
}
}
}