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

folder permission checks and null folder

This commit is contained in:
Kyle Spearrin
2017-06-09 09:48:44 -04:00
parent d3073e675e
commit f24bc96846
6 changed files with 15 additions and 6 deletions

View File

@ -255,7 +255,8 @@ namespace Bit.Api.Controllers
public async Task MoveMany([FromBody]CipherBulkMoveRequestModel model)
{
var userId = _userService.GetProperUserId(User).Value;
await _cipherService.MoveManyAsync(model.Ids.Select(i => new Guid(i)), new Guid(model.FolderId), userId);
await _cipherService.MoveManyAsync(model.Ids.Select(i => new Guid(i)),
string.IsNullOrWhiteSpace(model.FolderId) ? (Guid?)null : new Guid(model.FolderId), userId);
}
}
}