[ML] Transforms: Align privileges checks with ML plugin. (#112970)

To check the available node count, the ML plugin has an additional privileges check before returning the result. This PR uses the same approach for the corresponding transforms node endpoint.
This commit is contained in:
Walter Rafelsberger 2021-09-27 15:35:27 +02:00 committed by GitHub
parent 314227d259
commit ae4e7ccc51
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 56 additions and 1 deletions

View file

@ -59,6 +59,9 @@ export const APP_CLUSTER_PRIVILEGES = [
'cluster:admin/transform/stop',
];
// Minimum privileges required to return transform node count
export const NODES_INFO_PRIVILEGES = ['cluster:monitor/transform/get'];
// Equivalent of capabilities.canGetTransform
export const APP_GET_TRANSFORM_CLUSTER_PRIVILEGES = [
'cluster.cluster:monitor/transform/get',