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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user