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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user