1
0
mirror of https://github.com/bitwarden/server synced 2026-01-05 18:13:31 +00:00

[AC-1139] Created new CollectionOperation ReadAccess and changed GetUsers_vNext to use it

This commit is contained in:
Rui Tome
2023-10-30 14:52:37 +00:00
parent 4b293d7ac8
commit bd3d66ab60
3 changed files with 3 additions and 1 deletions

View File

@@ -566,7 +566,7 @@ public class CollectionsController : Controller
private async Task<IEnumerable<SelectionReadOnlyResponseModel>> GetUsers_vNext(Guid id)
{
var collection = await _collectionRepository.GetByIdAsync(id);
var authorized = (await _authorizationService.AuthorizeAsync(User, collection, CollectionOperations.Read)).Succeeded;
var authorized = (await _authorizationService.AuthorizeAsync(User, collection, CollectionOperations.ReadAccess)).Succeeded;
if (!authorized)
{
throw new NotFoundException();