diff --git a/TIAM.Entities/Users/UserProductMapping.cs b/TIAM.Entities/Users/UserProductMapping.cs index 6898dd7c..1184e919 100644 --- a/TIAM.Entities/Users/UserProductMapping.cs +++ b/TIAM.Entities/Users/UserProductMapping.cs @@ -35,6 +35,13 @@ public class UserProductMapping : IEntityGuid, IUserRelation, IProductRelation, public UserProductMapping() { } + public UserProductMapping(UserProductMapping upm) : this(upm.Id, upm.UserId, upm.ProductId, upm.Permissions, upm.JsonDetailModel) + { + IsAdmin = upm.IsAdmin; + Created = upm.Created; + Modified = upm.Modified; + } + public UserProductMapping(Guid userId, Guid productId) : this(Guid.NewGuid(), userId, productId) { } diff --git a/TIAM.Models/Dtos/Users/UserModelDtoDetail.cs b/TIAM.Models/Dtos/Users/UserModelDtoDetail.cs index 81492896..d8acb46b 100644 --- a/TIAM.Models/Dtos/Users/UserModelDtoDetail.cs +++ b/TIAM.Models/Dtos/Users/UserModelDtoDetail.cs @@ -46,7 +46,7 @@ namespace TIAM.Models.Dtos.Users foreach (var userProduct in user.UserProductMappings) { - UserProductMappings.Add(new UserProductMapping(userProduct.Id, userProduct.UserId, userProduct.ProductId)); + UserProductMappings.Add(new UserProductMapping(userProduct)); } } diff --git a/TIAMWebApp/Shared/Models/UserSessionModel.cs b/TIAMWebApp/Shared/Models/UserSessionModel.cs index b9542fc2..1c38c114 100644 --- a/TIAMWebApp/Shared/Models/UserSessionModel.cs +++ b/TIAMWebApp/Shared/Models/UserSessionModel.cs @@ -23,7 +23,7 @@ namespace TIAMWebApp.Shared.Application.Models UserType = userType; UserModelDto = userModelDto; HasProperties = hasProperties; - //UserRoles = userRoles; + UserRoles = userRoles; //UserRolesDictionary = new Dictionary(); //UserModelDto.ServiceProviders[0].