mirror of
https://github.com/bitwarden/server.git
synced 2025-07-07 19:05:07 -05:00
Changed all C# control flow block statements to include space between keyword and open paren
This commit is contained in:
@ -34,7 +34,7 @@ namespace Bit.Api.Controllers
|
||||
public async Task<GroupResponseModel> Get(string orgId, string id)
|
||||
{
|
||||
var group = await _groupRepository.GetByIdAsync(new Guid(id));
|
||||
if(group == null || !_currentContext.OrganizationAdmin(group.OrganizationId))
|
||||
if (group == null || !_currentContext.OrganizationAdmin(group.OrganizationId))
|
||||
{
|
||||
throw new NotFoundException();
|
||||
}
|
||||
@ -46,7 +46,7 @@ namespace Bit.Api.Controllers
|
||||
public async Task<GroupDetailsResponseModel> GetDetails(string orgId, string id)
|
||||
{
|
||||
var groupDetails = await _groupRepository.GetByIdWithCollectionsAsync(new Guid(id));
|
||||
if(groupDetails?.Item1 == null || !_currentContext.OrganizationAdmin(groupDetails.Item1.OrganizationId))
|
||||
if (groupDetails?.Item1 == null || !_currentContext.OrganizationAdmin(groupDetails.Item1.OrganizationId))
|
||||
{
|
||||
throw new NotFoundException();
|
||||
}
|
||||
@ -58,7 +58,7 @@ namespace Bit.Api.Controllers
|
||||
public async Task<ListResponseModel<GroupResponseModel>> Get(string orgId)
|
||||
{
|
||||
var orgIdGuid = new Guid(orgId);
|
||||
if(!_currentContext.OrganizationManager(orgIdGuid))
|
||||
if (!_currentContext.OrganizationManager(orgIdGuid))
|
||||
{
|
||||
throw new NotFoundException();
|
||||
}
|
||||
@ -73,7 +73,7 @@ namespace Bit.Api.Controllers
|
||||
{
|
||||
var idGuid = new Guid(id);
|
||||
var group = await _groupRepository.GetByIdAsync(idGuid);
|
||||
if(group == null || !_currentContext.OrganizationAdmin(group.OrganizationId))
|
||||
if (group == null || !_currentContext.OrganizationAdmin(group.OrganizationId))
|
||||
{
|
||||
throw new NotFoundException();
|
||||
}
|
||||
@ -86,7 +86,7 @@ namespace Bit.Api.Controllers
|
||||
public async Task<GroupResponseModel> Post(string orgId, [FromBody]GroupRequestModel model)
|
||||
{
|
||||
var orgIdGuid = new Guid(orgId);
|
||||
if(!_currentContext.OrganizationAdmin(orgIdGuid))
|
||||
if (!_currentContext.OrganizationAdmin(orgIdGuid))
|
||||
{
|
||||
throw new NotFoundException();
|
||||
}
|
||||
@ -101,7 +101,7 @@ namespace Bit.Api.Controllers
|
||||
public async Task<GroupResponseModel> Put(string orgId, string id, [FromBody]GroupRequestModel model)
|
||||
{
|
||||
var group = await _groupRepository.GetByIdAsync(new Guid(id));
|
||||
if(group == null || !_currentContext.OrganizationAdmin(group.OrganizationId))
|
||||
if (group == null || !_currentContext.OrganizationAdmin(group.OrganizationId))
|
||||
{
|
||||
throw new NotFoundException();
|
||||
}
|
||||
@ -114,7 +114,7 @@ namespace Bit.Api.Controllers
|
||||
public async Task PutUsers(string orgId, string id, [FromBody]IEnumerable<Guid> model)
|
||||
{
|
||||
var group = await _groupRepository.GetByIdAsync(new Guid(id));
|
||||
if(group == null || !_currentContext.OrganizationAdmin(group.OrganizationId))
|
||||
if (group == null || !_currentContext.OrganizationAdmin(group.OrganizationId))
|
||||
{
|
||||
throw new NotFoundException();
|
||||
}
|
||||
@ -126,7 +126,7 @@ namespace Bit.Api.Controllers
|
||||
public async Task Delete(string orgId, string id)
|
||||
{
|
||||
var group = await _groupRepository.GetByIdAsync(new Guid(id));
|
||||
if(group == null || !_currentContext.OrganizationAdmin(group.OrganizationId))
|
||||
if (group == null || !_currentContext.OrganizationAdmin(group.OrganizationId))
|
||||
{
|
||||
throw new NotFoundException();
|
||||
}
|
||||
@ -139,7 +139,7 @@ namespace Bit.Api.Controllers
|
||||
public async Task Delete(string orgId, string id, string orgUserId)
|
||||
{
|
||||
var group = await _groupRepository.GetByIdAsync(new Guid(id));
|
||||
if(group == null || !_currentContext.OrganizationAdmin(group.OrganizationId))
|
||||
if (group == null || !_currentContext.OrganizationAdmin(group.OrganizationId))
|
||||
{
|
||||
throw new NotFoundException();
|
||||
}
|
||||
|
Reference in New Issue
Block a user