UserModelDtoDetail permission fix

This commit is contained in:
Loretta 2024-07-03 06:49:09 +02:00
parent d3714d491d
commit 4e4afd538c
3 changed files with 9 additions and 2 deletions

View File

@ -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)
{ }

View File

@ -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));
}
}

View File

@ -23,7 +23,7 @@ namespace TIAMWebApp.Shared.Application.Models
UserType = userType;
UserModelDto = userModelDto;
HasProperties = hasProperties;
//UserRoles = userRoles;
UserRoles = userRoles;
//UserRolesDictionary = new Dictionary<int, string>();
//UserModelDto.ServiceProviders[0].