1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 15:42:48 -05:00

fix bumping AccountRevisionDate when creating and updating ciphers (#2634)

When the user is not part of an organization,
`UserBumpAccountRevisionDateByCipherIdQuery` doesn't work. In that case
we have to use `UserBumpAccountRevisionDateAsync` instead.

This was already done by most parts of the code but a few more were
missing.

Fixes #2615
This commit is contained in:
Michael Zimmermann
2023-02-02 15:33:35 +01:00
committed by GitHub
parent 28a3d4ad92
commit e019f0191d
4 changed files with 37 additions and 18 deletions

View File

@ -159,7 +159,7 @@ public class CipherRepositoryTests
var postEfCipher = await sut.CreateAsync(cipher);
sut.ClearChangeTracking();
var query = new UserBumpAccountRevisionDateByCipherIdQuery(cipher);
var query = new UserBumpAccountRevisionDateByCipherIdQuery(cipher, cipher.OrganizationId.Value);
var modifiedUsers = await sut.Run(query).ToListAsync();
Assert.True(modifiedUsers
.All(u => u.AccountRevisionDate.ToShortDateString() ==