mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 07:43:35 +00:00
[AC-2763] Allow providers who are also members access to items (#9585)
* [AC-2763] Do not restrict providers if they are also a member of the organization * [AC-2763] Reduce branching complexity * [AC-2763] Remove explicit restrict provider access checks in Vault We can safely fall back organization helpers for cipher access as it already accounts for provider users who are members.
This commit is contained in:
@@ -311,10 +311,6 @@ export class VaultComponent implements OnInit, OnDestroy {
|
||||
|
||||
this.editableCollections$ = this.allCollectionsWithoutUnassigned$.pipe(
|
||||
map((collections) => {
|
||||
// If restricted, providers can not add items to any collections or edit those items
|
||||
if (this.organization.isProviderUser && this.restrictProviderAccessEnabled) {
|
||||
return [];
|
||||
}
|
||||
// Users that can edit all ciphers can implicitly add to / edit within any collection
|
||||
if (
|
||||
this.organization.canEditAllCiphers(
|
||||
@@ -356,10 +352,6 @@ export class VaultComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
let ciphers;
|
||||
|
||||
if (organization.isProviderUser && this.restrictProviderAccessEnabled) {
|
||||
return [];
|
||||
}
|
||||
|
||||
if (this.flexibleCollectionsV1Enabled) {
|
||||
// Flexible collections V1 logic.
|
||||
// If the user can edit all ciphers for the organization then fetch them ALL.
|
||||
@@ -488,10 +480,6 @@ export class VaultComponent implements OnInit, OnDestroy {
|
||||
organization$,
|
||||
]).pipe(
|
||||
map(([filter, collection, organization]) => {
|
||||
if (organization.isProviderUser && this.restrictProviderAccessEnabled) {
|
||||
return collection != undefined || filter.collectionId === Unassigned;
|
||||
}
|
||||
|
||||
return (
|
||||
(filter.collectionId === Unassigned &&
|
||||
!organization.canEditUnassignedCiphers(this.restrictProviderAccessEnabled)) ||
|
||||
|
||||
Reference in New Issue
Block a user