1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-02 16:42:50 -05:00

limit collection scope option when creating cipher

This commit is contained in:
Kyle Spearrin
2018-10-22 14:09:55 -04:00
parent 6641d884f5
commit 0b166a080e
5 changed files with 98 additions and 64 deletions

View File

@ -143,7 +143,7 @@ namespace Bit.Api.Controllers
}
var userId = _userService.GetProperUserId(User).Value;
await _cipherService.SaveAsync(cipher, userId, model.CollectionIds, true);
await _cipherService.SaveAsync(cipher, userId, model.CollectionIds, true, false);
var response = new CipherMiniResponseModel(cipher, _globalSettings, false);
return response;
@ -188,7 +188,7 @@ namespace Bit.Api.Controllers
// object cannot be a descendant of CipherDetails, so let's clone it.
var cipherClone = CoreHelpers.CloneObject(model.ToCipher(cipher));
await _cipherService.SaveAsync(cipherClone, userId, null, true);
await _cipherService.SaveAsync(cipherClone, userId, null, true, false);
var response = new CipherMiniResponseModel(cipherClone, _globalSettings, cipher.OrganizationUseTotp);
return response;