Merge branch 'v9/dev' into v10/feature/merge-v9-dev

# Conflicts:
#	build/templates/UmbracoPackage/.template.config/template.json
#	build/templates/UmbracoProject/.template.config/template.json
#	src/Directory.Build.props
#	src/Umbraco.Core/Actions/ActionAssignDomain.cs
#	src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Services.cs
#	src/Umbraco.Web.BackOffice/Controllers/AuthenticationController.cs
#	src/Umbraco.Web.BackOffice/DependencyInjection/UmbracoBuilderExtensions.cs
#	src/Umbraco.Web.Common/Extensions/ApplicationBuilderExtensions.cs
This commit is contained in:
Paul Johnson
2022-01-18 11:31:03 +00:00
98 changed files with 1854 additions and 275 deletions

View File

@@ -65,14 +65,11 @@ namespace Umbraco.Cms.Core.Models.Mapping
var resolved = base.Map(source, context);
// This is kind of a hack because a developer is supposed to be allowed to set their property editor - would have been much easier
// if we just had all of the membership provider fields on the member table :(
// TODO: But is there a way to map the IMember.IsLockedOut to the property ? i dunno.
// IMember.IsLockedOut can't be set to true, so make it readonly when that's the case (you can only unlock)
var isLockedOutProperty = resolved.SelectMany(x => x.Properties).FirstOrDefault(x => x.Alias == Constants.Conventions.Member.IsLockedOut);
if (isLockedOutProperty?.Value != null && isLockedOutProperty.Value.ToString() != "1")
{
isLockedOutProperty.View = "readonlyvalue";
isLockedOutProperty.Value = _localizedTextService.Localize("general", "no");
isLockedOutProperty.Readonly = true;
}
return resolved;
@@ -191,20 +188,6 @@ namespace Umbraco.Cms.Core.Models.Mapping
{
var properties = new List<ContentPropertyDisplay>
{
new ContentPropertyDisplay
{
Alias = $"{Constants.PropertyEditors.InternalGenericPropertiesPrefix}id",
Label = _localizedTextService.Localize("general","id"),
Value = new List<string> {member.Id.ToString(), member.Key.ToString()},
View = "idwithguid"
},
new ContentPropertyDisplay
{
Alias = $"{Constants.PropertyEditors.InternalGenericPropertiesPrefix}doctype",
Label = _localizedTextService.Localize("content","membertype"),
Value = _localizedTextService.UmbracoDictionaryTranslate(CultureDictionary, member.ContentType.Name),
View = _propertyEditorCollection[Constants.PropertyEditors.Aliases.Label].GetValueEditor().View
},
GetLoginProperty(member, _localizedTextService),
new ContentPropertyDisplay
{
@@ -212,7 +195,7 @@ namespace Umbraco.Cms.Core.Models.Mapping
Label = _localizedTextService.Localize("general","email"),
Value = member.Email,
View = "email",
Validation = {Mandatory = true}
Validation = { Mandatory = true }
},
new ContentPropertyDisplay
{
@@ -221,12 +204,10 @@ namespace Umbraco.Cms.Core.Models.Mapping
Value = new Dictionary<string, object>
{
// TODO: why ignoreCase, what are we doing here?!
{"newPassword", member.GetAdditionalDataValueIgnoreCase("NewPassword", null)},
{ "newPassword", member.GetAdditionalDataValueIgnoreCase("NewPassword", null) }
},
// TODO: Hard coding this because the changepassword doesn't necessarily need to be a resolvable (real) property editor
View = "changepassword",
// Initialize the dictionary with the configuration from the default membership provider
Config = GetPasswordConfig(member)
Config = GetPasswordConfig(member) // Initialize the dictionary with the configuration from the default membership provider
},
new ContentPropertyDisplay
{
@@ -234,7 +215,10 @@ namespace Umbraco.Cms.Core.Models.Mapping
Label = _localizedTextService.Localize("content","membergroup"),
Value = GetMemberGroupValue(member.Username),
View = "membergroups",
Config = new Dictionary<string, object> {{"IsRequired", true}}
Config = new Dictionary<string, object>
{
{ "IsRequired", true }
}
}
};