mirror of
https://github.com/bitwarden/server
synced 2025-12-27 21:53:24 +00:00
[PM-22503] Fix manage cipher permission (#5972)
* Added new tests to validate that the ciphers are being grouped and filtered correctly when assigned to multiple collections and changing order of grouping properties.
This commit is contained in:
@@ -98,7 +98,10 @@ public class CipherRepository : Repository<Cipher, Guid>, ICipherRepository
|
||||
|
||||
return results
|
||||
.GroupBy(c => c.Id)
|
||||
.Select(g => g.OrderByDescending(og => og.Edit).ThenByDescending(og => og.ViewPassword).First())
|
||||
.Select(g =>
|
||||
g.OrderByDescending(og => og.Manage)
|
||||
.ThenByDescending(og => og.Edit)
|
||||
.ThenByDescending(og => og.ViewPassword).First())
|
||||
.ToList();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user