1
0
mirror of https://github.com/bitwarden/server synced 2026-01-05 18:13:31 +00:00

[SM-485] Add access policy on project creation (#2678)

* Add bootstrap access policy on create

* Update project integration tests
This commit is contained in:
Thomas Avery
2023-02-09 08:58:05 -06:00
committed by GitHub
parent 04c4be8a15
commit 35b832dbc9
8 changed files with 476 additions and 112 deletions

View File

@@ -65,7 +65,8 @@ public class ProjectsController : Controller
throw new NotFoundException();
}
var result = await _createProjectCommand.CreateAsync(createRequest.ToProject(organizationId));
var userId = _userService.GetProperUserId(User).Value;
var result = await _createProjectCommand.CreateAsync(createRequest.ToProject(organizationId), userId);
return new ProjectResponseModel(result);
}

View File

@@ -4,5 +4,5 @@ namespace Bit.Core.SecretsManager.Commands.Projects.Interfaces;
public interface ICreateProjectCommand
{
Task<Project> CreateAsync(Project project);
Task<Project> CreateAsync(Project project, Guid userId);
}