mirror of
https://github.com/bitwarden/server.git
synced 2025-04-05 13:08:17 -05:00

* mssql add column and migration * Add secret access policies to EF models and config * Clear new access policies on service account delete * Add SM cleanup code on delete * Fix EF org user bulk delete * Run EF migrations
24 lines
846 B
C#
24 lines
846 B
C#
using AutoMapper;
|
|
using Bit.Infrastructure.EntityFramework.AdminConsole.Models;
|
|
|
|
namespace Bit.Infrastructure.EntityFramework.SecretsManager.Models;
|
|
|
|
public class Secret : Core.SecretsManager.Entities.Secret
|
|
{
|
|
public new virtual ICollection<Project> Projects { get; set; }
|
|
public virtual Organization Organization { get; set; }
|
|
public virtual ICollection<UserSecretAccessPolicy> UserAccessPolicies { get; set; }
|
|
public virtual ICollection<GroupSecretAccessPolicy> GroupAccessPolicies { get; set; }
|
|
public virtual ICollection<ServiceAccountSecretAccessPolicy> ServiceAccountAccessPolicies { get; set; }
|
|
}
|
|
|
|
public class SecretMapperProfile : Profile
|
|
{
|
|
public SecretMapperProfile()
|
|
{
|
|
CreateMap<Core.SecretsManager.Entities.Secret, Secret>()
|
|
.PreserveReferences()
|
|
.ReverseMap();
|
|
}
|
|
}
|