1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-21 12:05:42 +01:00

[AC-1612] Updated CurrentContext.ViewAssignedCollections to check if the user has CreateNewCollections permission (#3233)

* [AC-1612] Updated CurrentContext.ViewAssignedCollections to check if the user has CreateNewCollections permission

* [AC-1612] Added comment to clarify the requirement of the added check in ViewAssignedCollections
This commit is contained in:
Rui Tomé 2023-09-07 10:42:04 +01:00 committed by GitHub
parent 952e77d3d7
commit 8c75326439
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -358,7 +358,9 @@ public class CurrentContext : ICurrentContext
public async Task<bool> ViewAssignedCollections(Guid orgId)
{
return await EditAssignedCollections(orgId) || await DeleteAssignedCollections(orgId);
return await CreateNewCollections(orgId) // Required to display the existing collections under which the new collection can be nested
|| await EditAssignedCollections(orgId)
|| await DeleteAssignedCollections(orgId);
}
public async Task<bool> ManageGroups(Guid orgId)