Merged with v8/dev
This commit is contained in:
@@ -16,5 +16,10 @@
|
||||
/// along with any content types that have matching property types that are included in the filtered content types
|
||||
/// </summary>
|
||||
public string[] FilterContentTypes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Wether the content type is currently marked as an element type
|
||||
/// </summary>
|
||||
public bool IsElement { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ using Umbraco.Core.Models;
|
||||
using Umbraco.Core.PropertyEditors;
|
||||
using Umbraco.Web.Models.ContentEditing;
|
||||
using Umbraco.Core.Services;
|
||||
using Umbraco.Core.Exceptions;
|
||||
|
||||
namespace Umbraco.Web.Models.Mapping
|
||||
{
|
||||
@@ -577,7 +578,7 @@ namespace Umbraco.Web.Models.Mapping
|
||||
udiType = Constants.UdiEntityType.DocumentType;
|
||||
break;
|
||||
default:
|
||||
throw new Exception("panic");
|
||||
throw new PanicException($"Source is of type {source.GetType()} which isn't supported here");
|
||||
}
|
||||
|
||||
return Udi.Create(udiType, source.Key);
|
||||
|
||||
@@ -46,10 +46,19 @@ namespace Umbraco.Web.Models.Mapping
|
||||
target.Icon = Constants.Icons.Member;
|
||||
|
||||
if (source is IContentEntitySlim contentSlim)
|
||||
{
|
||||
source.AdditionalData["ContentTypeAlias"] = contentSlim.ContentTypeAlias;
|
||||
}
|
||||
|
||||
if (source is IDocumentEntitySlim documentSlim)
|
||||
{
|
||||
source.AdditionalData["IsPublished"] = documentSlim.Published;
|
||||
}
|
||||
|
||||
if (source is IMediaEntitySlim mediaSlim)
|
||||
{
|
||||
source.AdditionalData["MediaPath"] = mediaSlim.MediaPath;
|
||||
}
|
||||
|
||||
// NOTE: we're mapping the objects in AdditionalData by object reference here.
|
||||
// it works fine for now, but it's something to keep in mind in the future
|
||||
|
||||
@@ -301,7 +301,7 @@ namespace Umbraco.Web.Models.Mapping
|
||||
target.Avatars = source.GetUserAvatarUrls(_appCaches.RuntimeCache);
|
||||
target.Culture = source.GetUserCulture(_textService, _globalSettings).ToString();
|
||||
target.Email = source.Email;
|
||||
target.EmailHash = source.Email.ToLowerInvariant().Trim().ToMd5();
|
||||
target.EmailHash = source.Email.ToLowerInvariant().Trim().GenerateHash();
|
||||
target.Id = source.Id;
|
||||
target.Key = source.Key;
|
||||
target.LastLoginDate = source.LastLoginDate == default ? null : (DateTime?) source.LastLoginDate;
|
||||
|
||||
Reference in New Issue
Block a user