Merge branch temp8 into temp8-U4-11227
This commit is contained in:
@@ -52,14 +52,7 @@ namespace Umbraco.Web.Models.ContentEditing
|
||||
/// Member Group
|
||||
/// </summary>
|
||||
MemberGroup,
|
||||
|
||||
/// <summary>
|
||||
/// Content Item
|
||||
/// </summary>
|
||||
[Obsolete("This is not used and will be removed in future versions")]
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
ContentItem,
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// "Media Type
|
||||
/// </summary>
|
||||
|
||||
@@ -25,13 +25,7 @@ namespace Umbraco.Web.Models.ContentEditing
|
||||
/// </summary>
|
||||
[DataMember(Name = "emailHash")]
|
||||
public string EmailHash { get; set; }
|
||||
|
||||
[Obsolete("This should not be used it exists for legacy reasons only, use user groups instead, it will be removed in future versions")]
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
[ReadOnly(true)]
|
||||
[DataMember(Name = "userType")]
|
||||
public string UserType { get; set; }
|
||||
|
||||
|
||||
[ReadOnly(true)]
|
||||
[DataMember(Name = "userGroups")]
|
||||
public string[] UserGroups { get; set; }
|
||||
|
||||
@@ -47,7 +47,6 @@ namespace Umbraco.Web.Models.Mapping
|
||||
.ForMember(detail => detail.TourData, opt => opt.Ignore())
|
||||
.ForMember(dest => dest.SessionTimeout, opt => opt.Ignore())
|
||||
.ForMember(dest => dest.EmailConfirmedDate, opt => opt.Ignore())
|
||||
.ForMember(dest => dest.UserType, opt => opt.Ignore())
|
||||
.ForMember(dest => dest.InvitedDate, opt => opt.Ignore())
|
||||
.ForMember(dest => dest.SecurityStamp, opt => opt.Ignore())
|
||||
.ForMember(dest => dest.Avatar, opt => opt.Ignore())
|
||||
@@ -79,7 +78,6 @@ namespace Umbraco.Web.Models.Mapping
|
||||
.ForMember(detail => detail.TourData, opt => opt.Ignore())
|
||||
.ForMember(dest => dest.StartContentIds, opt => opt.Ignore())
|
||||
.ForMember(dest => dest.StartMediaIds, opt => opt.Ignore())
|
||||
.ForMember(dest => dest.UserType, opt => opt.Ignore())
|
||||
.ForMember(dest => dest.Language, opt => opt.Ignore())
|
||||
.ForMember(dest => dest.Username, opt => opt.Ignore())
|
||||
.ForMember(dest => dest.PasswordQuestion, opt => opt.Ignore())
|
||||
@@ -332,26 +330,6 @@ namespace Umbraco.Web.Models.Mapping
|
||||
var groups = user.Groups.ToArray();
|
||||
detail.UserGroups = user.Groups.Select(x => x.Alias).ToArray();
|
||||
|
||||
if (groups.Length == 0)
|
||||
{
|
||||
//In backwards compatibility land, a user type cannot be null! so we need to return a fake one.
|
||||
detail.UserType = "temp";
|
||||
}
|
||||
else
|
||||
{
|
||||
var builtIns = new[] { Constants.Security.AdminGroupAlias, "writer", "editor", Constants.Security.TranslatorGroupAlias };
|
||||
var foundBuiltIn = groups.FirstOrDefault(x => builtIns.Contains(x.Alias));
|
||||
if (foundBuiltIn != null)
|
||||
{
|
||||
detail.UserType = foundBuiltIn.Alias;
|
||||
}
|
||||
else
|
||||
{
|
||||
//otherwise return the first
|
||||
detail.UserType = groups[0].Alias;
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
CreateMap<IProfile, ContentEditing.UserProfile>()
|
||||
|
||||
@@ -25,7 +25,6 @@ namespace Umbraco.Web.Models
|
||||
private RegisterModel(bool doLookup)
|
||||
{
|
||||
MemberTypeAlias = Constants.Conventions.MemberTypes.DefaultAlias;
|
||||
RedirectOnSucces = false;
|
||||
UsernameIsEmail = true;
|
||||
MemberProperties = new List<UmbracoProperty>();
|
||||
LoginOnSuccess = true;
|
||||
@@ -69,11 +68,7 @@ namespace Umbraco.Web.Models
|
||||
/// </summary>
|
||||
[Required]
|
||||
public string Password { get; set; }
|
||||
|
||||
[ReadOnly(true)]
|
||||
[Obsolete("This is no longer used and will be removed from the codebase in future versions")]
|
||||
public bool RedirectOnSucces { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// The username of the model, if UsernameIsEmail is true then this is ignored.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user