mirror of
https://github.com/bitwarden/server.git
synced 2025-07-03 17:12:49 -05:00
[SM-390] Project Access Policies (#2507)
The purpose of this PR is to create server endpoints for creating, reading, updating, and deleting access policies for projects.
This commit is contained in:
@ -1,27 +0,0 @@
|
||||
using AutoMapper;
|
||||
using Bit.Core.Repositories;
|
||||
using Bit.Infrastructure.EntityFramework.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using CoreAccessPolicy = Bit.Core.Entities.AccessPolicy;
|
||||
|
||||
namespace Bit.Infrastructure.EntityFramework.Repositories;
|
||||
|
||||
public class AccessPolicyRepository : IAccessPolicyRepository
|
||||
{
|
||||
public AccessPolicyRepository(IServiceScopeFactory serviceScopeFactory, IMapper mapper)
|
||||
{
|
||||
}
|
||||
|
||||
protected Func<DatabaseContext, DbSet<AccessPolicy>> GetDbSet { get; private set; }
|
||||
|
||||
public Task<CoreAccessPolicy> GetByIdAsync(Guid id) => throw new NotImplementedException();
|
||||
|
||||
public Task<CoreAccessPolicy> CreateAsync(CoreAccessPolicy obj) => throw new NotImplementedException();
|
||||
|
||||
public Task ReplaceAsync(CoreAccessPolicy obj) => throw new NotImplementedException();
|
||||
|
||||
public Task UpsertAsync(CoreAccessPolicy obj) => throw new NotImplementedException();
|
||||
|
||||
public Task DeleteAsync(CoreAccessPolicy obj) => throw new NotImplementedException();
|
||||
}
|
@ -17,6 +17,9 @@ public class DatabaseContext : DbContext
|
||||
{ }
|
||||
|
||||
public DbSet<AccessPolicy> AccessPolicies { get; set; }
|
||||
public DbSet<UserProjectAccessPolicy> UserProjectAccessPolicy { get; set; }
|
||||
public DbSet<GroupProjectAccessPolicy> GroupProjectAccessPolicy { get; set; }
|
||||
public DbSet<ServiceAccountProjectAccessPolicy> ServiceAccountProjectAccessPolicy { get; set; }
|
||||
public DbSet<ApiKey> ApiKeys { get; set; }
|
||||
public DbSet<Cipher> Ciphers { get; set; }
|
||||
public DbSet<Collection> Collections { get; set; }
|
||||
|
Reference in New Issue
Block a user