mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 14:23:32 +00:00
[AC-1658] Update list command to show only organizations where the user is a member (#9453)
* Refactor list organizations command to use organizationService.memberOrganizations$ * Deprecate OrganizationService.getAll method and update CLI get command to use the organizations observable
This commit is contained in:
@@ -468,7 +468,7 @@ export class GetCommand extends DownloadCommand {
|
||||
if (Utils.isGuid(id)) {
|
||||
org = await this.organizationService.getFromState(id);
|
||||
} else if (id.trim() !== "") {
|
||||
let orgs = await this.organizationService.getAll();
|
||||
let orgs = await firstValueFrom(this.organizationService.organizations$);
|
||||
orgs = CliUtils.searchOrganizations(orgs, id);
|
||||
if (orgs.length > 1) {
|
||||
return Response.multipleResults(orgs.map((c) => c.id));
|
||||
|
||||
Reference in New Issue
Block a user