From 11c0025c2711819567874dbce51503b25207dbd8 Mon Sep 17 00:00:00 2001 From: Alison Goryachev Date: Sun, 28 Jun 2020 13:04:52 -0400 Subject: [PATCH] fix reducer function when finding missing privileges --- .../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({