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

Only check assigned collections if lacking privs for all (#1657)

This commit is contained in:
Matt Gibson 2021-10-20 16:17:40 -05:00 committed by GitHub
parent de3f1005fc
commit 5d163eb5bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -176,8 +176,7 @@ namespace Bit.Api.Controllers
{ {
collection = await _collectionRepository.GetByIdAsync(id); collection = await _collectionRepository.GetByIdAsync(id);
} }
else if (await _currentContext.ViewAssignedCollections(orgId))
if (await _currentContext.ViewAssignedCollections(orgId))
{ {
collection = await _collectionRepository.GetByIdAsync(id, _currentContext.UserId.Value); collection = await _collectionRepository.GetByIdAsync(id, _currentContext.UserId.Value);
} }