Move LoginBackgroundImage to the content section instead of the security section

This commit is contained in:
Sebastiaan Janssen
2017-03-30 11:15:12 +02:00
parent 339edb2295
commit 2daf71aee4
8 changed files with 25 additions and 24 deletions

View File

@@ -183,6 +183,12 @@ namespace Umbraco.Core.Configuration.UmbracoSettings
get { return GetOptionalTextElement("EnablePropertyValueConverters", false); }
}
[ConfigurationProperty("loginBackgroundImage")]
internal InnerTextConfigurationElement<string> 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; }
}
}
}

View File

@@ -72,5 +72,6 @@ namespace Umbraco.Core.Configuration.UmbracoSettings
bool EnablePropertyValueConverters { get; }
string LoginBackgroundImage { get; }
}
}

View File

@@ -11,7 +11,5 @@
string AuthCookieName { get; }
string AuthCookieDomain { get; }
string LoginBackgroundImage { get; }
}
}

View File

@@ -34,13 +34,6 @@ namespace Umbraco.Core.Configuration.UmbracoSettings
get { return GetOptionalTextElement<string>("authCookieDomain", null); }
}
[ConfigurationProperty("loginBackgroundImage")]
internal InnerTextConfigurationElement<string> 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; }
}
}
}

View File

@@ -58,6 +58,9 @@
<!-- Enables value converters for all built in property editors so that they return strongly typed object, recommended for use with Models Builder -->
<EnablePropertyValueConverters>true</EnablePropertyValueConverters>
<!-- You can specify your own background image for the login screen here. The image will automatically get an overlay to match back office colors - this path is relative to the ~/umbraco path. The default location is: /umbraco/assets/img/installer.jpg -->
<loginBackgroundImage>assets/img/installer.jpg</loginBackgroundImage>
</content>
<security>
@@ -65,8 +68,6 @@
<keepUserLoggedIn>false</keepUserLoggedIn>
<!-- change in 4.8: Disabled users are now showed dimmed and last in the tree. If you prefer not to display them set this to true -->
<hideDisabledUsersInBackoffice>false</hideDisabledUsersInBackoffice>
<!-- You can specify your own background image for the login screen here. I'll automatically get the purple overlay to match back office colors -->
<loginBackgroundImage>assets/img/installer.jpg</loginBackgroundImage>
</security>
<requestHandler>

View File

@@ -108,7 +108,11 @@
<showDeprecatedPropertyEditors>true</showDeprecatedPropertyEditors>
<!-- Enables value converters for all built in property editors so that they return strongly typed object, recommended for use with Models Builder -->
<EnablePropertyValueConverters>true</EnablePropertyValueConverters>
<EnablePropertyValueConverters>true</EnablePropertyValueConverters>
<!-- You can specify your own background image for the login screen here. The image will automatically get an overlay to match back office colors - this path is relative to the ~/umbraco path. The default location is: /umbraco/assets/img/installer.jpg -->
<loginBackgroundImage>assets/img/normalname.jpg</loginBackgroundImage>
</content>
<security>
@@ -120,9 +124,6 @@
<!-- set to true to enable the UI and API to allow back-office users to reset their passwords -->
<allowPasswordReset>true</allowPasswordReset>
<!-- You can specify your own background image for the login screen here. I'll automatically get the purple overlay to match back office colors -->
<loginBackgroundImage>assets/img/installer.jpg</loginBackgroundImage>
</security>

View File

@@ -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<string, object>
{

View File

@@ -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 + @""",