From 1e669b87eb8c1c831024441eec023a9b9bac670f Mon Sep 17 00:00:00 2001 From: Constance Chen Date: Wed, 9 Sep 2020 08:06:49 -0700 Subject: [PATCH] Update role type casing - ent search was fixed from camel to snake --- .../server/lib/enterprise_search_config_api.test.ts | 2 +- .../server/lib/enterprise_search_config_api.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/x-pack/plugins/enterprise_search/server/lib/enterprise_search_config_api.test.ts b/x-pack/plugins/enterprise_search/server/lib/enterprise_search_config_api.test.ts index 870f0501ec010..8e3ae2cfbeb86 100644 --- a/x-pack/plugins/enterprise_search/server/lib/enterprise_search_config_api.test.ts +++ b/x-pack/plugins/enterprise_search/server/lib/enterprise_search_config_api.test.ts @@ -67,7 +67,7 @@ describe('callEnterpriseSearchConfigAPI', () => { }, role: { id: 'account_id:somestring|user_oid:somestring', - roleType: 'owner', + role_type: 'owner', ability: { access_all_engines: true, destroy: ['session'], diff --git a/x-pack/plugins/enterprise_search/server/lib/enterprise_search_config_api.ts b/x-pack/plugins/enterprise_search/server/lib/enterprise_search_config_api.ts index 69fe0802d3e0c..10a75e59cb249 100644 --- a/x-pack/plugins/enterprise_search/server/lib/enterprise_search_config_api.ts +++ b/x-pack/plugins/enterprise_search/server/lib/enterprise_search_config_api.ts @@ -92,7 +92,7 @@ export const callEnterpriseSearchConfigAPI = async ({ onBoardingComplete: !!data?.current_user?.app_search?.account?.onboarding_complete, role: { id: data?.current_user?.app_search?.role?.id, - roleType: data?.current_user?.app_search?.role?.roleType, + roleType: data?.current_user?.app_search?.role?.role_type, ability: { accessAllEngines: !!data?.current_user?.app_search?.role?.ability?.access_all_engines, destroy: data?.current_user?.app_search?.role?.ability?.destroy || [],