[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.
pull/18708/head^2
Brad 3 months ago committed by GitHub
parent 2a72d2e74d
commit 8d3cbd3da6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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);
}
}

@ -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);
}
}

@ -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);
}
}

@ -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);
}
}

@ -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);
}
}

Loading…
Cancel
Save