Removed relationship between users and applications and got back to a compiling state.

Set up editing screens for group/node permissions.
This commit is contained in:
AndyButland
2016-10-27 18:11:46 +02:00
parent cbb36a900a
commit 2d9aeb3aa1
66 changed files with 1430 additions and 1625 deletions

View File

@@ -34,6 +34,7 @@ namespace Umbraco.Core.Models.Identity
public int StartContentId { get; set; }
public int StartMediaId { get; set; }
public string[] AllowedSections { get; set; }
public string[] Groups { get; set; }
public string Culture { get; set; }
public string UserTypeAlias { get; set; }

View File

@@ -24,12 +24,14 @@ namespace Umbraco.Core.Models.Identity
.ForMember(user => user.StartContentId, expression => expression.MapFrom(user => user.StartContentId))
.ForMember(user => user.UserTypeAlias, expression => expression.MapFrom(user => user.UserType.Alias))
.ForMember(user => user.AccessFailedCount, expression => expression.MapFrom(user => user.FailedPasswordAttempts))
.ForMember(user => user.Groups, expression => expression.MapFrom(user => user.Groups.Select(x => x.Name).ToArray()))
.ForMember(user => user.AllowedSections, expression => expression.MapFrom(user => user.AllowedSections.ToArray()));
config.CreateMap<BackOfficeIdentityUser, UserData>()
.ConstructUsing((BackOfficeIdentityUser user) => new UserData(Guid.NewGuid().ToString("N"))) //this is the 'session id'
.ForMember(detail => detail.Id, opt => opt.MapFrom(user => user.Id))
.ForMember(detail => detail.AllowedApplications, opt => opt.MapFrom(user => user.AllowedSections))
.ForMember(detail => detail.Groups, opt => opt.MapFrom(user => user.Groups))
.ForMember(detail => detail.RealName, opt => opt.MapFrom(user => user.Name))
.ForMember(detail => detail.Roles, opt => opt.MapFrom(user => new[] { user.UserTypeAlias }))
.ForMember(detail => detail.StartContentNode, opt => opt.MapFrom(user => user.StartContentId))