mirror of
https://github.com/bitwarden/server.git
synced 2025-07-05 01:52:49 -05:00
[AC-1139] Created new CollectionOperation ReadAccess and changed GetUsers_vNext to use it
This commit is contained in:
@ -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();
|
||||
|
Reference in New Issue
Block a user