From 5d163eb5bdd5e8845a81375dcbeec6c0d92e4fb8 Mon Sep 17 00:00:00 2001 From: Matt Gibson Date: Wed, 20 Oct 2021 16:17:40 -0500 Subject: [PATCH] Only check assigned collections if lacking privs for all (#1657) --- src/Api/Controllers/CollectionsController.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Api/Controllers/CollectionsController.cs b/src/Api/Controllers/CollectionsController.cs index 3eff8e3bbd..56d35f1a91 100644 --- a/src/Api/Controllers/CollectionsController.cs +++ b/src/Api/Controllers/CollectionsController.cs @@ -176,8 +176,7 @@ namespace Bit.Api.Controllers { collection = await _collectionRepository.GetByIdAsync(id); } - - if (await _currentContext.ViewAssignedCollections(orgId)) + else if (await _currentContext.ViewAssignedCollections(orgId)) { collection = await _collectionRepository.GetByIdAsync(id, _currentContext.UserId.Value); }