From 2daf71aee4bceb747b5c8823619c17b0c7b4be4b Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Thu, 30 Mar 2017 11:15:12 +0200 Subject: [PATCH] Move LoginBackgroundImage to the content section instead of the security section --- .../Configuration/UmbracoSettings/ContentElement.cs | 11 +++++++++++ .../Configuration/UmbracoSettings/IContentSection.cs | 1 + .../Configuration/UmbracoSettings/ISecuritySection.cs | 2 -- .../Configuration/UmbracoSettings/SecurityElement.cs | 11 ----------- .../config/umbracoSettings.Release.config | 5 +++-- src/Umbraco.Web.UI/config/umbracoSettings.config | 9 +++++---- src/Umbraco.Web/Editors/BackOfficeController.cs | 8 ++++---- src/Umbraco.Web/HtmlHelperBackOfficeExtensions.cs | 2 +- 8 files changed, 25 insertions(+), 24 deletions(-) diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/ContentElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/ContentElement.cs index 912582f1ef..51a39e15df 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/ContentElement.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/ContentElement.cs @@ -183,6 +183,12 @@ namespace Umbraco.Core.Configuration.UmbracoSettings get { return GetOptionalTextElement("EnablePropertyValueConverters", false); } } + [ConfigurationProperty("loginBackgroundImage")] + internal InnerTextConfigurationElement LoginBackgroundImage + { + get { return GetOptionalTextElement("loginBackgroundImage", string.Empty); } + } + string IContentSection.NotificationEmailAddress { get { return Notifications.NotificationEmailAddress; } @@ -336,5 +342,10 @@ namespace Umbraco.Core.Configuration.UmbracoSettings { get { return EnablePropertyValueConverters; } } + + string IContentSection.LoginBackgroundImage + { + get { return LoginBackgroundImage; } + } } } \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/IContentSection.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/IContentSection.cs index 5dbf9f1a33..d73b3b9e41 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/IContentSection.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/IContentSection.cs @@ -72,5 +72,6 @@ namespace Umbraco.Core.Configuration.UmbracoSettings bool EnablePropertyValueConverters { get; } + string LoginBackgroundImage { get; } } } \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/ISecuritySection.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/ISecuritySection.cs index 374148a955..c44c0cf0df 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/ISecuritySection.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/ISecuritySection.cs @@ -11,7 +11,5 @@ string AuthCookieName { get; } string AuthCookieDomain { get; } - - string LoginBackgroundImage { get; } } } \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/SecurityElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/SecurityElement.cs index 32928de26e..ddb168ddbd 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/SecurityElement.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/SecurityElement.cs @@ -34,13 +34,6 @@ namespace Umbraco.Core.Configuration.UmbracoSettings get { return GetOptionalTextElement("authCookieDomain", null); } } - - [ConfigurationProperty("loginBackgroundImage")] - internal InnerTextConfigurationElement LoginBackgroundImage - { - get { return GetOptionalTextElement("loginBackgroundImage", string.Empty); } - } - bool ISecuritySection.KeepUserLoggedIn { get { return KeepUserLoggedIn; } @@ -65,9 +58,5 @@ namespace Umbraco.Core.Configuration.UmbracoSettings { get { return AuthCookieDomain; } } - string ISecuritySection.LoginBackgroundImage - { - get { return LoginBackgroundImage; } - } } } \ No newline at end of file diff --git a/src/Umbraco.Web.UI/config/umbracoSettings.Release.config b/src/Umbraco.Web.UI/config/umbracoSettings.Release.config index f33907c23e..6687e71f4c 100644 --- a/src/Umbraco.Web.UI/config/umbracoSettings.Release.config +++ b/src/Umbraco.Web.UI/config/umbracoSettings.Release.config @@ -58,6 +58,9 @@ true + + + assets/img/installer.jpg @@ -65,8 +68,6 @@ false false - - assets/img/installer.jpg diff --git a/src/Umbraco.Web.UI/config/umbracoSettings.config b/src/Umbraco.Web.UI/config/umbracoSettings.config index 6aeba699e7..495300258a 100644 --- a/src/Umbraco.Web.UI/config/umbracoSettings.config +++ b/src/Umbraco.Web.UI/config/umbracoSettings.config @@ -108,7 +108,11 @@ true - true + true + + + assets/img/normalname.jpg + @@ -120,9 +124,6 @@ true - - - assets/img/installer.jpg diff --git a/src/Umbraco.Web/Editors/BackOfficeController.cs b/src/Umbraco.Web/Editors/BackOfficeController.cs index 296bcc9590..fdc6bd77dc 100644 --- a/src/Umbraco.Web/Editors/BackOfficeController.cs +++ b/src/Umbraco.Web/Editors/BackOfficeController.cs @@ -394,10 +394,10 @@ namespace Umbraco.Web.Editors }, {"keepUserLoggedIn", UmbracoConfig.For.UmbracoSettings().Security.KeepUserLoggedIn}, {"cssPath", IOHelper.ResolveUrl(SystemDirectories.Css).TrimEnd('/')}, - { "allowPasswordReset", UmbracoConfig.For.UmbracoSettings().Security.AllowPasswordReset}, - { "loginBackgroundImage", UmbracoConfig.For.UmbracoSettings().Security.LoginBackgroundImage}, - } - }, + {"allowPasswordReset", UmbracoConfig.For.UmbracoSettings().Security.AllowPasswordReset}, + {"loginBackgroundImage", UmbracoConfig.For.UmbracoSettings().Content.LoginBackgroundImage}, + } + }, { "umbracoPlugins", new Dictionary { diff --git a/src/Umbraco.Web/HtmlHelperBackOfficeExtensions.cs b/src/Umbraco.Web/HtmlHelperBackOfficeExtensions.cs index 707ae8fdc1..1de50f5b71 100644 --- a/src/Umbraco.Web/HtmlHelperBackOfficeExtensions.cs +++ b/src/Umbraco.Web/HtmlHelperBackOfficeExtensions.cs @@ -48,7 +48,7 @@ namespace Umbraco.Web }, ""umbracoSettings"": { ""allowPasswordReset"": " + (UmbracoConfig.For.UmbracoSettings().Security.AllowPasswordReset ? "true" : "false") + @", - ""loginBackgroundImage"": """ + UmbracoConfig.For.UmbracoSettings().Security.LoginBackgroundImage + @""" + ""loginBackgroundImage"": """ + UmbracoConfig.For.UmbracoSettings().Content.LoginBackgroundImage + @""" }, ""application"": { ""applicationPath"": """ + html.ViewContext.HttpContext.Request.ApplicationPath + @""",