Skip to content

Commit b058f3f

Browse files
reinsert braces
1 parent 1007c39 commit b058f3f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Api/Vault/Controllers/CiphersController.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1068,7 +1068,9 @@ public async Task<Dictionary<Guid, DateTime>> PutShareMany([FromBody] CipherBulk
10681068
{
10691069
var organizationId = new Guid(model.Ciphers.First().OrganizationId);
10701070
if (!await _currentContext.OrganizationUser(organizationId))
1071+
{
10711072
throw new NotFoundException();
1073+
}
10721074

10731075
var userId = _userService.GetProperUserId(User).Value;
10741076

@@ -1079,14 +1081,18 @@ public async Task<Dictionary<Guid, DateTime>> PutShareMany([FromBody] CipherBulk
10791081
foreach (var cipher in model.Ciphers)
10801082
{
10811083
if (cipher.EncryptedFor.HasValue && cipher.EncryptedFor.Value != userId)
1084+
{
10821085
throw new BadRequestException("Cipher was not encrypted for the current user. Please try again.");
1086+
}
10831087
}
10841088

10851089
var shareCiphers = new List<(Cipher, DateTime?)>();
10861090
foreach (var cipher in model.Ciphers)
10871091
{
10881092
if (!ciphersDict.TryGetValue(cipher.Id.Value, out var existingCipher))
1093+
{
10891094
throw new BadRequestException("Trying to share ciphers that you do not own.");
1095+
}
10901096

10911097
ValidateClientVersionForFido2CredentialSupport(existingCipher);
10921098

0 commit comments

Comments
 (0)