1
0
mirror of https://github.com/bitwarden/server.git synced 2025-01-21 21:41:21 +01:00

Added the AccessReports permission to enable report viewing (#4648)

This commit is contained in:
Tom 2024-08-26 06:59:49 -04:00 committed by GitHub
parent aa66b5ad11
commit 78beac9f19
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -324,12 +324,13 @@ public class CiphersController : Controller
var org = _currentContext.GetOrganization(organizationId);
// We do NOT need to check the organization collection management setting here because Owners/Admins can
// ALWAYS access all ciphers in order to export them. Additionally, custom users with AccessImportExport or
// EditAnyCollection permissions can also always access all ciphers.
// ALWAYS access all ciphers in order to export them. Additionally, custom users with AccessImportExport,
// EditAnyCollection, or AccessReports permissions can also always access all ciphers.
if (org is
{ Type: OrganizationUserType.Owner or OrganizationUserType.Admin } or
{ Permissions.AccessImportExport: true } or
{ Permissions.EditAnyCollection: true })
{ Permissions.EditAnyCollection: true } or
{ Permissions.AccessReports: true })
{
return true;
}