1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-05 01:52:49 -05:00

[AC-1139] Created new CollectionOperationRequirement ReadAllWithAccess

This commit is contained in:
Rui Tome
2023-10-30 15:27:24 +00:00
parent bd3d66ab60
commit c62922842f
4 changed files with 41 additions and 3 deletions

View File

@ -521,7 +521,7 @@ public class CollectionsController : Controller
.GetManyByUserIdWithAccessAsync(_currentContext.UserId.Value, orgId);
var readAllAuthorized =
(await _authorizationService.AuthorizeAsync(User, CollectionOperations.ReadAll(orgId))).Succeeded;
(await _authorizationService.AuthorizeAsync(User, CollectionOperations.ReadAllWithAccess(orgId))).Succeeded;
if (readAllAuthorized)
{
// The user can view all collections, but they may not always be assigned to all of them