mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[Synthetics] Only allow params to be saved against specific namespaces (#155948)
## Summary We had an issue backporting some changes in a previous patch, and some of the code from the update did not make it into 8.7. This PR introduces a commit that did not fully merge. Co-authored-by: shahzad31 <shahzad31comp@gmail.com>
This commit is contained in:
parent
167c3285d8
commit
40546954e9
1 changed files with 2 additions and 2 deletions
|
@ -473,7 +473,7 @@ export class SyntheticsService {
|
|||
async getSyntheticsParams({ spaceId }: { spaceId?: string } = {}) {
|
||||
const encryptedClient = this.server.encryptedSavedObjects.getClient();
|
||||
|
||||
const paramsBySpace: Record<string, Record<string, string>> = {};
|
||||
const paramsBySpace: Record<string, Record<string, string>> = Object.create(null);
|
||||
|
||||
const finder =
|
||||
await encryptedClient.createPointInTimeFinderDecryptedAsInternalUser<SyntheticsParamSO>({
|
||||
|
@ -486,7 +486,7 @@ export class SyntheticsService {
|
|||
response.saved_objects.forEach((param) => {
|
||||
param.namespaces?.forEach((namespace) => {
|
||||
if (!paramsBySpace[namespace]) {
|
||||
paramsBySpace[namespace] = {};
|
||||
paramsBySpace[namespace] = Object.create(null);
|
||||
}
|
||||
paramsBySpace[namespace][param.attributes.key] = param.attributes.value;
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue