mirror of
https://github.com/bitwarden/server.git
synced 2025-04-12 08:38:13 -05:00
[AC-1685] Add ViewAllCollections check to GetOrganizationCollectionsAsync method (#3323)
This commit is contained in:
parent
9007aa6556
commit
2701321659
@ -98,7 +98,13 @@ public class CollectionService : ICollectionService
|
||||
|
||||
public async Task<IEnumerable<Collection>> GetOrganizationCollectionsAsync(Guid organizationId)
|
||||
{
|
||||
if (!await _currentContext.ViewAssignedCollections(organizationId) && !await _currentContext.ManageUsers(organizationId) && !await _currentContext.ManageGroups(organizationId) && !await _currentContext.AccessImportExport(organizationId))
|
||||
if (
|
||||
!await _currentContext.ViewAssignedCollections(organizationId) &&
|
||||
!await _currentContext.ViewAllCollections(organizationId) &&
|
||||
!await _currentContext.ManageUsers(organizationId) &&
|
||||
!await _currentContext.ManageGroups(organizationId) &&
|
||||
!await _currentContext.AccessImportExport(organizationId)
|
||||
)
|
||||
{
|
||||
throw new NotFoundException();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user