Skip to content

Commit

Permalink
[Workspace]Add workspaces and permissions fields into saved objects _…
Browse files Browse the repository at this point in the history
…bulk_get response (#7565)

* fix missing fields

Signed-off-by: Hailong Cui <ihailong@amazon.com>

* Changeset file for PR #7565 created/updated

---------

Signed-off-by: Hailong Cui <ihailong@amazon.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
(cherry picked from commit f3dee46)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
1 parent dc522de commit 55ebb7b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions changelogs/fragments/7565.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fix:
- [Workspace]Add workspaces and permissions fields into saved objects _bulk_get response ([#7565](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7565))
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

import { includedFields } from './included_fields';

const BASE_FIELD_COUNT = 9;
const BASE_FIELD_COUNT = 11;

describe('includedFields', () => {
it('returns undefined if fields are not provided', () => {
Expand All @@ -56,6 +56,8 @@ Array [
"migrationVersion",
"updated_at",
"originId",
"workspaces",
"permissions",
"foo",
]
`);
Expand Down Expand Up @@ -90,6 +92,8 @@ Array [
"migrationVersion",
"updated_at",
"originId",
"workspaces",
"permissions",
"foo",
"bar",
]
Expand Down
2 changes: 2 additions & 0 deletions src/core/server/saved_objects/service/lib/included_fields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,7 @@ export function includedFields(type: string | string[] = '*', fields?: string[]
.concat('migrationVersion')
.concat('updated_at')
.concat('originId')
.concat('workspaces')
.concat('permissions')
.concat(fields); // v5 compatibility
}
2 changes: 2 additions & 0 deletions src/core/server/saved_objects/service/lib/repository.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2819,6 +2819,8 @@ describe('SavedObjectsRepository', () => {
'migrationVersion',
'updated_at',
'originId',
'workspaces',
'permissions',
'title',
],
}),
Expand Down

0 comments on commit 55ebb7b

Please sign in to comment.