diff --git a/apps/web/src/app/vault/components/vault-items/vault-collection-row.component.ts b/apps/web/src/app/vault/components/vault-items/vault-collection-row.component.ts index 8909c3e8bd..873bdd3e1a 100644 --- a/apps/web/src/app/vault/components/vault-items/vault-collection-row.component.ts +++ b/apps/web/src/app/vault/components/vault-items/vault-collection-row.component.ts @@ -69,9 +69,9 @@ export class VaultCollectionRowComponent { if (this.collection instanceof CollectionAdminView) { // Only show AddAccess if unmanaged and allowAdminAccessToAllCollectionItems is disabled return ( - !this.organization.allowAdminAccessToAllCollectionItems && + !this.organization?.allowAdminAccessToAllCollectionItems && this.collection.unmanaged && - this.organization.canEditUnmanagedCollections() + this.organization?.canEditUnmanagedCollections() ); } diff --git a/apps/web/src/app/vault/org-vault/vault-header/vault-header.component.html b/apps/web/src/app/vault/org-vault/vault-header/vault-header.component.html index ee45f5921e..75ea3fd050 100644 --- a/apps/web/src/app/vault/org-vault/vault-header/vault-header.component.html +++ b/apps/web/src/app/vault/org-vault/vault-header/vault-header.component.html @@ -93,7 +93,7 @@ (); @@ -352,6 +356,16 @@ export class VaultComponent implements OnInit, OnDestroy { } let ciphers; + // Restricted providers (who are not members) do not have access org cipher endpoint below + // Return early to avoid 404 response + if ( + this.restrictProviderAccessEnabled && + !organization.isMember && + organization.isProviderUser + ) { + return []; + } + if (this.flexibleCollectionsV1Enabled) { // Flexible collections V1 logic. // If the user can edit all ciphers for the organization then fetch them ALL.