diff --git a/apps/cli/src/admin-console/models/response/organization-collection.response.ts b/apps/cli/src/admin-console/models/response/organization-collection.response.ts index ca47a4b074..730e668909 100644 --- a/apps/cli/src/admin-console/models/response/organization-collection.response.ts +++ b/apps/cli/src/admin-console/models/response/organization-collection.response.ts @@ -5,10 +5,12 @@ import { SelectionReadOnly } from "../selection-read-only"; export class OrganizationCollectionResponse extends CollectionResponse { groups: SelectionReadOnly[]; + users: SelectionReadOnly[]; - constructor(o: CollectionView, groups: SelectionReadOnly[]) { + constructor(o: CollectionView, groups: SelectionReadOnly[], users: SelectionReadOnly[]) { super(o); this.object = "org-collection"; this.groups = groups; + this.users = users; } } diff --git a/apps/cli/src/commands/edit.command.ts b/apps/cli/src/commands/edit.command.ts index 75cd241207..1bba149a35 100644 --- a/apps/cli/src/commands/edit.command.ts +++ b/apps/cli/src/commands/edit.command.ts @@ -184,7 +184,7 @@ export class EditCommand { const response = await this.apiService.putCollection(req.organizationId, id, request); const view = CollectionExport.toView(req); view.id = response.id; - const res = new OrganizationCollectionResponse(view, groups); + const res = new OrganizationCollectionResponse(view, groups, users); return Response.success(res); } catch (e) { return Response.error(e); diff --git a/apps/cli/src/commands/get.command.ts b/apps/cli/src/commands/get.command.ts index a91df2a1ca..7e31750583 100644 --- a/apps/cli/src/commands/get.command.ts +++ b/apps/cli/src/commands/get.command.ts @@ -456,7 +456,13 @@ export class GetCommand extends DownloadCommand { : response.groups.map( (g) => new SelectionReadOnly(g.id, g.readOnly, g.hidePasswords, g.manage), ); - const res = new OrganizationCollectionResponse(decCollection, groups); + const users = + response.users == null + ? null + : response.users.map( + (g) => new SelectionReadOnly(g.id, g.readOnly, g.hidePasswords, g.manage), + ); + const res = new OrganizationCollectionResponse(decCollection, groups, users); return Response.success(res); } catch (e) { return Response.error(e); diff --git a/apps/cli/src/vault/create.command.ts b/apps/cli/src/vault/create.command.ts index 716c2b42bb..5db3bda97c 100644 --- a/apps/cli/src/vault/create.command.ts +++ b/apps/cli/src/vault/create.command.ts @@ -208,7 +208,7 @@ export class CreateCommand { const response = await this.apiService.postCollection(req.organizationId, request); const view = CollectionExport.toView(req); view.id = response.id; - const res = new OrganizationCollectionResponse(view, groups); + const res = new OrganizationCollectionResponse(view, groups, users); return Response.success(res); } catch (e) { return Response.error(e);