mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 15:53:27 +00:00
[PS-1942] Add Provider Filters (#4147)
* Add Helper to filter out Provider Orgs * Use filter where getAll used to be used * Change name to isNotProviderUser
This commit is contained in:
@@ -4,7 +4,10 @@ import { firstValueFrom, from, mergeMap, Observable } from "rxjs";
|
||||
import { CipherService } from "@bitwarden/common/abstractions/cipher.service";
|
||||
import { CollectionService } from "@bitwarden/common/abstractions/collection.service";
|
||||
import { FolderService } from "@bitwarden/common/abstractions/folder/folder.service.abstraction";
|
||||
import { OrganizationService } from "@bitwarden/common/abstractions/organization/organization.service.abstraction";
|
||||
import {
|
||||
isNotProviderUser,
|
||||
OrganizationService,
|
||||
} from "@bitwarden/common/abstractions/organization/organization.service.abstraction";
|
||||
import { PolicyService } from "@bitwarden/common/abstractions/policy/policy.service.abstraction";
|
||||
import { StateService } from "@bitwarden/common/abstractions/state.service";
|
||||
import { PolicyType } from "@bitwarden/common/enums/policyType";
|
||||
@@ -40,7 +43,9 @@ export class VaultFilterService {
|
||||
async buildOrganizations(): Promise<Organization[]> {
|
||||
let organizations = await this.organizationService.getAll();
|
||||
if (organizations != null) {
|
||||
organizations = organizations.sort((a, b) => a.name.localeCompare(b.name));
|
||||
organizations = organizations
|
||||
.filter(isNotProviderUser)
|
||||
.sort((a, b) => a.name.localeCompare(b.name));
|
||||
}
|
||||
|
||||
return organizations;
|
||||
|
||||
Reference in New Issue
Block a user