1
0
mirror of https://github.com/bitwarden/server synced 2025-12-19 09:43:25 +00: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

@@ -63,7 +63,7 @@ namespace Bit.Api.Controllers
public async Task<ListResponseModel<TwoFactorProviderResponseModel>> GetOrganization(string id)
{
var orgIdGuid = new Guid(id);
if (!_currentContext.OrganizationAdmin(orgIdGuid))
if (!await _currentContext.OrganizationAdmin(orgIdGuid))
{
throw new NotFoundException();
}
@@ -169,7 +169,7 @@ namespace Bit.Api.Controllers
var user = await CheckAsync(model.MasterPasswordHash, false);
var orgIdGuid = new Guid(id);
if (!_currentContext.ManagePolicies(orgIdGuid))
if (!await _currentContext.ManagePolicies(orgIdGuid))
{
throw new NotFoundException();
}
@@ -192,7 +192,7 @@ namespace Bit.Api.Controllers
var user = await CheckAsync(model.MasterPasswordHash, false);
var orgIdGuid = new Guid(id);
if (!_currentContext.ManagePolicies(orgIdGuid))
if (!await _currentContext.ManagePolicies(orgIdGuid))
{
throw new NotFoundException();
}
@@ -332,7 +332,7 @@ namespace Bit.Api.Controllers
var user = await CheckAsync(model.MasterPasswordHash, false);
var orgIdGuid = new Guid(id);
if (!_currentContext.ManagePolicies(orgIdGuid))
if (!await _currentContext.ManagePolicies(orgIdGuid))
{
throw new NotFoundException();
}