1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-04 01:22:50 -05:00

[Provider] Create and access child organizations (#1427)

This commit is contained in:
Oscar Hinton
2021-07-08 17:05:32 +02:00
committed by GitHub
parent a6128c781a
commit feb3106f37
51 changed files with 756 additions and 232 deletions

View File

@ -53,7 +53,7 @@ namespace Bit.Api.Controllers
public async Task<PolicyResponseModel> Get(string orgId, int type)
{
var orgIdGuid = new Guid(orgId);
if (!_currentContext.ManagePolicies(orgIdGuid))
if (!await _currentContext.ManagePolicies(orgIdGuid))
{
throw new NotFoundException();
}
@ -70,7 +70,7 @@ namespace Bit.Api.Controllers
public async Task<ListResponseModel<PolicyResponseModel>> Get(string orgId)
{
var orgIdGuid = new Guid(orgId);
if (!_currentContext.ManagePolicies(orgIdGuid))
if (!await _currentContext.ManagePolicies(orgIdGuid))
{
throw new NotFoundException();
}
@ -109,7 +109,7 @@ namespace Bit.Api.Controllers
public async Task<PolicyResponseModel> Put(string orgId, int type, [FromBody]PolicyRequestModel model)
{
var orgIdGuid = new Guid(orgId);
if (!_currentContext.ManagePolicies(orgIdGuid))
if (!await _currentContext.ManagePolicies(orgIdGuid))
{
throw new NotFoundException();
}