1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-18 10:23:52 +00:00

[PM-31801] Fix: Allow admins/owners to edit all ciphers in reports when Org setting is enabled#18856

This PR fixes an issue where admins couldn't edit ciphers in organization reports when the "Allow Admin Access to All Collection Items" setting was enabled.

The fix adds a check for organization.allowAdminAccessToAllCollectionItems in the canManage() method across all organization report components. When this setting is enabled, admins/owners can now properly edit all ciphers regardless of collection membership.
This commit is contained in:
Brad
2026-02-12 13:59:27 -08:00
committed by GitHub
parent 2a72d2e74d
commit 8d3cbd3da6
5 changed files with 15 additions and 0 deletions

View File

@@ -103,6 +103,9 @@ export class ExposedPasswordsReportComponent
if (c.collectionIds.length === 0) {
return true;
}
if (this.organization?.allowAdminAccessToAllCollectionItems) {
return true;
}
return this.manageableCiphers.some((x) => x.id === c.id);
}
}

View File

@@ -108,6 +108,9 @@ export class InactiveTwoFactorReportComponent
if (c.collectionIds.length === 0) {
return true;
}
if (this.organization?.allowAdminAccessToAllCollectionItems) {
return true;
}
return this.manageableCiphers.some((x) => x.id === c.id);
}
}

View File

@@ -102,6 +102,9 @@ export class ReusedPasswordsReportComponent
if (c.collectionIds.length === 0) {
return true;
}
if (this.organization?.allowAdminAccessToAllCollectionItems) {
return true;
}
return this.manageableCiphers.some((x) => x.id === c.id);
}
}

View File

@@ -105,6 +105,9 @@ export class UnsecuredWebsitesReportComponent
if (c.collectionIds.length === 0) {
return true;
}
if (this.organization?.allowAdminAccessToAllCollectionItems) {
return true;
}
return this.manageableCiphers.some((x) => x.id === c.id);
}
}

View File

@@ -104,6 +104,9 @@ export class WeakPasswordsReportComponent
if (c.collectionIds.length === 0) {
return true;
}
if (this.organization?.allowAdminAccessToAllCollectionItems) {
return true;
}
return this.manageableCiphers.some((x) => x.id === c.id);
}
}