1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-05 13:08:17 -05:00
Thomas Avery 1499d1e2c6
[SM-713] Add database support for secret access policies (#3681)
* 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
2024-02-22 10:06:39 -06:00

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