From 636433d441d6c2986958206a3a98972d3ba82fea Mon Sep 17 00:00:00 2001 From: Nathan Reese Date: Thu, 12 Nov 2020 13:06:18 -0700 Subject: [PATCH] add tags to all privileges and add test user to find, delete, get, get_all, and update tests --- x-pack/plugins/maps/server/plugin.ts | 2 +- .../api_integration/security_and_spaces/apis/_find.ts | 1 + .../api_integration/security_and_spaces/apis/delete.ts | 1 + .../api_integration/security_and_spaces/apis/get.ts | 1 + .../api_integration/security_and_spaces/apis/get_all.ts | 1 + .../api_integration/security_and_spaces/apis/update.ts | 1 + 6 files changed, 6 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/maps/server/plugin.ts b/x-pack/plugins/maps/server/plugin.ts index 5925db1af691f..a79e5353048c8 100644 --- a/x-pack/plugins/maps/server/plugin.ts +++ b/x-pack/plugins/maps/server/plugin.ts @@ -185,7 +185,7 @@ export class MapsPlugin implements Plugin { catalogue: [APP_ID], savedObject: { all: [MAP_SAVED_OBJECT_TYPE, 'query'], - read: ['index-pattern'], + read: ['index-pattern', 'tag'], }, ui: ['save', 'show', 'saveQuery'], }, diff --git a/x-pack/test/saved_object_tagging/api_integration/security_and_spaces/apis/_find.ts b/x-pack/test/saved_object_tagging/api_integration/security_and_spaces/apis/_find.ts index 4f08134365e95..8734b7cf5bb68 100644 --- a/x-pack/test/saved_object_tagging/api_integration/security_and_spaces/apis/_find.ts +++ b/x-pack/test/saved_object_tagging/api_integration/security_and_spaces/apis/_find.ts @@ -60,6 +60,7 @@ export default function ({ getService }: FtrProviderContext) { USERS.DEFAULT_SPACE_SO_TAGGING_WRITE_USER, USERS.DEFAULT_SPACE_DASHBOARD_READ_USER, USERS.DEFAULT_SPACE_VISUALIZE_READ_USER, + USERS.DEFAULT_SPACE_MAPS_READ_USER, ], unauthorized: [USERS.NOT_A_KIBANA_USER, USERS.DEFAULT_SPACE_ADVANCED_SETTINGS_READ_USER], }; diff --git a/x-pack/test/saved_object_tagging/api_integration/security_and_spaces/apis/delete.ts b/x-pack/test/saved_object_tagging/api_integration/security_and_spaces/apis/delete.ts index 64f120fd75629..a2e3630622d67 100644 --- a/x-pack/test/saved_object_tagging/api_integration/security_and_spaces/apis/delete.ts +++ b/x-pack/test/saved_object_tagging/api_integration/security_and_spaces/apis/delete.ts @@ -53,6 +53,7 @@ export default function ({ getService }: FtrProviderContext) { USERS.DEFAULT_SPACE_DASHBOARD_READ_USER, USERS.DEFAULT_SPACE_VISUALIZE_READ_USER, USERS.DEFAULT_SPACE_ADVANCED_SETTINGS_READ_USER, + USERS.DEFAULT_SPACE_MAPS_READ_USER, USERS.NOT_A_KIBANA_USER, ], }; diff --git a/x-pack/test/saved_object_tagging/api_integration/security_and_spaces/apis/get.ts b/x-pack/test/saved_object_tagging/api_integration/security_and_spaces/apis/get.ts index 1a354bbbcb660..9cde766b4f514 100644 --- a/x-pack/test/saved_object_tagging/api_integration/security_and_spaces/apis/get.ts +++ b/x-pack/test/saved_object_tagging/api_integration/security_and_spaces/apis/get.ts @@ -57,6 +57,7 @@ export default function ({ getService }: FtrProviderContext) { USERS.DEFAULT_SPACE_SO_TAGGING_WRITE_USER, USERS.DEFAULT_SPACE_DASHBOARD_READ_USER, USERS.DEFAULT_SPACE_VISUALIZE_READ_USER, + USERS.DEFAULT_SPACE_MAPS_READ_USER, ], unauthorized: [USERS.NOT_A_KIBANA_USER, USERS.DEFAULT_SPACE_ADVANCED_SETTINGS_READ_USER], }; diff --git a/x-pack/test/saved_object_tagging/api_integration/security_and_spaces/apis/get_all.ts b/x-pack/test/saved_object_tagging/api_integration/security_and_spaces/apis/get_all.ts index 61b859cf81992..677bdee56ed8b 100644 --- a/x-pack/test/saved_object_tagging/api_integration/security_and_spaces/apis/get_all.ts +++ b/x-pack/test/saved_object_tagging/api_integration/security_and_spaces/apis/get_all.ts @@ -63,6 +63,7 @@ export default function ({ getService }: FtrProviderContext) { USERS.DEFAULT_SPACE_SO_TAGGING_WRITE_USER, USERS.DEFAULT_SPACE_DASHBOARD_READ_USER, USERS.DEFAULT_SPACE_VISUALIZE_READ_USER, + USERS.DEFAULT_SPACE_MAPS_READ_USER, ], unauthorized: [USERS.NOT_A_KIBANA_USER, USERS.DEFAULT_SPACE_ADVANCED_SETTINGS_READ_USER], }; diff --git a/x-pack/test/saved_object_tagging/api_integration/security_and_spaces/apis/update.ts b/x-pack/test/saved_object_tagging/api_integration/security_and_spaces/apis/update.ts index 77bf9d7ca3287..3347eca9920d6 100644 --- a/x-pack/test/saved_object_tagging/api_integration/security_and_spaces/apis/update.ts +++ b/x-pack/test/saved_object_tagging/api_integration/security_and_spaces/apis/update.ts @@ -60,6 +60,7 @@ export default function ({ getService }: FtrProviderContext) { USERS.DEFAULT_SPACE_DASHBOARD_READ_USER, USERS.DEFAULT_SPACE_VISUALIZE_READ_USER, USERS.DEFAULT_SPACE_ADVANCED_SETTINGS_READ_USER, + USERS.DEFAULT_SPACE_MAPS_READ_USER, USERS.NOT_A_KIBANA_USER, ], };