From 3571100bcce63ec3f338a893bd9c549007f7255c Mon Sep 17 00:00:00 2001 From: Alison Goryachev Date: Mon, 29 Jun 2020 08:31:59 -0400 Subject: [PATCH] [CCR] Fix reducer function when finding missing privileges (#70158) --- .../cross_cluster_replication/register_permissions_route.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/x-pack/plugins/cross_cluster_replication/server/routes/api/cross_cluster_replication/register_permissions_route.ts b/x-pack/plugins/cross_cluster_replication/server/routes/api/cross_cluster_replication/register_permissions_route.ts index b8eb5ae14750e..008828d264a2b 100644 --- a/x-pack/plugins/cross_cluster_replication/server/routes/api/cross_cluster_replication/register_permissions_route.ts +++ b/x-pack/plugins/cross_cluster_replication/server/routes/api/cross_cluster_replication/register_permissions_route.ts @@ -43,13 +43,13 @@ export const registerPermissionsRoute = ({ }); const missingClusterPrivileges = Object.keys(cluster).reduce( - (permissions: any, permissionName: any) => { + (permissions: string[], permissionName: string) => { if (!cluster[permissionName]) { permissions.push(permissionName); - return permissions; } + return permissions; }, - [] as any[] + [] ); return response.ok({