From 2e29d112e5e0ba16d3552fb424661e87125e4866 Mon Sep 17 00:00:00 2001 From: Claus Date: Thu, 6 Jul 2017 13:14:24 +0200 Subject: [PATCH] reformatting. --- .../Models/Mapping/UserModelMapper.cs | 52 +++++++++---------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/src/Umbraco.Web/Models/Mapping/UserModelMapper.cs b/src/Umbraco.Web/Models/Mapping/UserModelMapper.cs index f33d00b6b4..e2f43440aa 100644 --- a/src/Umbraco.Web/Models/Mapping/UserModelMapper.cs +++ b/src/Umbraco.Web/Models/Mapping/UserModelMapper.cs @@ -41,23 +41,23 @@ namespace Umbraco.Web.Models.Mapping //Used for merging existing UserSave to an existing IUser instance - this will not create an IUser instance! config.CreateMap() .IgnoreDeletableEntityCommonProperties() - .ForMember(dest => dest.Id, map => map.Condition(source => GetIntId(source.Id) > 0)) - .ForMember(detail => detail.SessionTimeout, opt => opt.Ignore()) - .ForMember(detail => detail.EmailConfirmedDate, opt => opt.Ignore()) - .ForMember(detail => detail.InvitedDate, opt => opt.Ignore()) - .ForMember(detail => detail.SecurityStamp, opt => opt.Ignore()) - .ForMember(detail => detail.Avatar, opt => opt.Ignore()) - .ForMember(detail => detail.ProviderUserKey, opt => opt.Ignore()) - .ForMember(detail => detail.RawPasswordValue, opt => opt.Ignore()) - .ForMember(detail => detail.RawPasswordAnswerValue, opt => opt.Ignore()) - .ForMember(detail => detail.PasswordQuestion, opt => opt.Ignore()) - .ForMember(detail => detail.Comments, opt => opt.Ignore()) - .ForMember(detail => detail.IsApproved, opt => opt.Ignore()) - .ForMember(detail => detail.IsLockedOut, opt => opt.Ignore()) - .ForMember(detail => detail.LastLoginDate, opt => opt.Ignore()) - .ForMember(detail => detail.LastPasswordChangeDate, opt => opt.Ignore()) - .ForMember(detail => detail.LastLockoutDate, opt => opt.Ignore()) - .ForMember(detail => detail.FailedPasswordAttempts, opt => opt.Ignore()) + .ForMember(dest => dest.Id, map => map.Condition(source => GetIntId(source.Id) > 0)) + .ForMember(detail => detail.SessionTimeout, opt => opt.Ignore()) + .ForMember(detail => detail.EmailConfirmedDate, opt => opt.Ignore()) + .ForMember(detail => detail.InvitedDate, opt => opt.Ignore()) + .ForMember(detail => detail.SecurityStamp, opt => opt.Ignore()) + .ForMember(detail => detail.Avatar, opt => opt.Ignore()) + .ForMember(detail => detail.ProviderUserKey, opt => opt.Ignore()) + .ForMember(detail => detail.RawPasswordValue, opt => opt.Ignore()) + .ForMember(detail => detail.RawPasswordAnswerValue, opt => opt.Ignore()) + .ForMember(detail => detail.PasswordQuestion, opt => opt.Ignore()) + .ForMember(detail => detail.Comments, opt => opt.Ignore()) + .ForMember(detail => detail.IsApproved, opt => opt.Ignore()) + .ForMember(detail => detail.IsLockedOut, opt => opt.Ignore()) + .ForMember(detail => detail.LastLoginDate, opt => opt.Ignore()) + .ForMember(detail => detail.LastPasswordChangeDate, opt => opt.Ignore()) + .ForMember(detail => detail.LastLockoutDate, opt => opt.Ignore()) + .ForMember(detail => detail.FailedPasswordAttempts, opt => opt.Ignore()) .ForMember(user => user.Language, expression => expression.MapFrom(save => save.Culture)) .AfterMap((save, user) => { @@ -91,8 +91,8 @@ namespace Umbraco.Web.Models.Mapping .ForMember(detail => detail.LastLoginDate, opt => opt.Ignore()) .ForMember(detail => detail.LastPasswordChangeDate, opt => opt.Ignore()) .ForMember(detail => detail.LastLockoutDate, opt => opt.Ignore()) - .ForMember(detail => detail.FailedPasswordAttempts, opt => opt.Ignore()) - //all invited users will not be approved, completing the invite will approve the user + .ForMember(detail => detail.FailedPasswordAttempts, opt => opt.Ignore()) + //all invited users will not be approved, completing the invite will approve the user .ForMember(user => user.IsApproved, expression => expression.UseValue(false)) .AfterMap((invite, user) => { @@ -167,7 +167,7 @@ namespace Umbraco.Web.Models.Mapping { basic.Icon = "icon-user"; } - }); + }); config.CreateMap() .ForMember(detail => detail.StartContentId, opt => opt.Ignore()) @@ -186,19 +186,19 @@ namespace Umbraco.Web.Models.Mapping { MapUserGroupBasic(applicationContext.Services, group, display); - //Important! Currently we are never mapping to multiple UserGroupDisplay objects but if we start doing that + //Important! Currently we are never mapping to multiple UserGroupDisplay objects but if we start doing that // this will cause an N+1 and we'll need to change how this works. var users = applicationContext.Services.UserService.GetAllInGroup(group.Id); display.Users = Mapper.Map>(users); - - //Deal with assigned permissions: + + //Deal with assigned permissions: var allContentPermissions = applicationContext.Services.UserService.GetPermissions(group, true) .ToDictionary(x => x.EntityId, x => x); - var contentEntities = allContentPermissions.Keys.Count == 0 - ? new IUmbracoEntity[0] - : applicationContext.Services.EntityService.GetAll(UmbracoObjectTypes.Document, allContentPermissions.Keys.ToArray()); + var contentEntities = allContentPermissions.Keys.Count == 0 + ? new IUmbracoEntity[0] + : applicationContext.Services.EntityService.GetAll(UmbracoObjectTypes.Document, allContentPermissions.Keys.ToArray()); var allAssignedPermissions = new List(); foreach (var entity in contentEntities)