From a3b0761182fa9a779b111e62cfd103a1b36f49e9 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Thu, 22 Jun 2023 09:08:38 -0400 Subject: [PATCH] update permissions according to backend (#1480) (#1484) Signed-off-by: Derek Ho (cherry picked from commit 8dab6a3ef00c7127f6713701187abac1addfc68a) Co-authored-by: Derek Ho --- public/apps/configuration/constants.tsx | 38 ++++++++++++------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/public/apps/configuration/constants.tsx b/public/apps/configuration/constants.tsx index 1a5435d8c8..25afa303e9 100644 --- a/public/apps/configuration/constants.tsx +++ b/public/apps/configuration/constants.tsx @@ -213,6 +213,25 @@ export const CLUSTER_PERMISSIONS: string[] = [ 'restapi:admin/ssl/certs/info', 'restapi:admin/ssl/certs/reload', 'restapi:admin/tenants', + 'indices:admin/template/delete', + 'indices:admin/template/get', + 'indices:admin/template/put', + 'indices:admin/index_template/delete', + 'indices:admin/index_template/get', + 'indices:admin/index_template/put', + 'indices:admin/index_template/simulate', + 'indices:admin/index_template/simulate_index', + 'indices:data/read/scroll', + 'indices:data/read/scroll/clear', + 'indices:data/write/bulk', + 'indices:data/write/bulk*', + 'indices:data/read/mget', + 'indices:data/read/mget*', + 'indices:data/read/msearch', + 'indices:data/read/msearch/template', + 'indices:data/read/mtv', + 'indices:data/read/mtv*', + 'indices:data/write/reindex', ]; export function includeClusterPermissions(clusterPermissionsToInclude: string[]) { @@ -241,11 +260,6 @@ export const INDEX_PERMISSIONS: string[] = [ 'indices:admin/flush*', 'indices:admin/forcemerge', 'indices:admin/get', - 'indices:admin/index_template/delete', - 'indices:admin/index_template/get', - 'indices:admin/index_template/put', - 'indices:admin/index_template/simulate', - 'indices:admin/index_template/simulate_index', 'indices:admin/mapping/auto_put', 'indices:admin/mapping/put', 'indices:admin/mappings/fields/get', @@ -265,9 +279,6 @@ export const INDEX_PERMISSIONS: string[] = [ 'indices:admin/shards/search_shards', 'indices:admin/shrink', 'indices:admin/synced_flush', - 'indices:admin/template/delete', - 'indices:admin/template/get', - 'indices:admin/template/put', 'indices:admin/types/exists', 'indices:admin/upgrade', 'indices:admin/validate/query', @@ -275,27 +286,16 @@ export const INDEX_PERMISSIONS: string[] = [ 'indices:data/read/field_caps', 'indices:data/read/field_caps*', 'indices:data/read/get', - 'indices:data/read/mget', - 'indices:data/read/mget*', - 'indices:data/read/msearch', - 'indices:data/read/msearch/template', - 'indices:data/read/mtv', - 'indices:data/read/mtv*', 'indices:data/read/point_in_time/create', 'indices:data/read/point_in_time/delete', 'indices:data/read/point_in_time/readall', - 'indices:data/read/scroll', - 'indices:data/read/scroll/clear', 'indices:data/read/search', 'indices:data/read/search*', 'indices:data/read/search/template', 'indices:data/read/tv', - 'indices:data/write/bulk', - 'indices:data/write/bulk*', 'indices:data/write/delete', 'indices:data/write/delete/byquery', 'indices:data/write/index', - 'indices:data/write/reindex', 'indices:data/write/update', 'indices:data/write/update/byquery', 'indices:monitor/data_stream/stats',