diff --git a/x-pack/plugins/transform/common/utils/transform_api_key.ts b/x-pack/plugins/transform/common/utils/transform_api_key.ts index 21d505d5fdb80..66187ef318ced 100644 --- a/x-pack/plugins/transform/common/utils/transform_api_key.ts +++ b/x-pack/plugins/transform/common/utils/transform_api_key.ts @@ -7,6 +7,7 @@ import type { GrantAPIKeyResult } from '@kbn/security-plugin/server'; import type { SecurityCreateApiKeyResponse } from '@elastic/elasticsearch/lib/api/types'; +import { isPopulatedObject } from '@kbn/ml-is-populated-object'; export interface TransformAPIKey extends GrantAPIKeyResult { /** @@ -20,12 +21,7 @@ export interface SecondaryAuthorizationHeader { } export function isTransformApiKey(arg: any): arg is TransformAPIKey { - return ( - arg && - arg.hasOwnProperty('api_key') && - arg.hasOwnProperty('encoded') && - typeof arg.encoded === 'string' - ); + return isPopulatedObject(arg, ['api_key', 'encoded']) && typeof arg.encoded === 'string'; } export function generateTransformSecondaryAuthHeaders( diff --git a/x-pack/plugins/transform/public/app/sections/transform_management/components/action_reauthorize/reauthorize_action_modal.tsx b/x-pack/plugins/transform/public/app/sections/transform_management/components/action_reauthorize/reauthorize_action_modal.tsx index f895755ec2396..9e848fdd8323e 100644 --- a/x-pack/plugins/transform/public/app/sections/transform_management/components/action_reauthorize/reauthorize_action_modal.tsx +++ b/x-pack/plugins/transform/public/app/sections/transform_management/components/action_reauthorize/reauthorize_action_modal.tsx @@ -56,7 +56,7 @@ export const ReauthorizeActionModal: FC = ({

{i18n.translate('xpack.transform.transformList.reauthorizeModalBody', { defaultMessage: - 'Reauthorize will update and start the transform with the the roles of the user. Starting a transform increases search and indexing load in your cluster. If excessive load is experienced, stop the transform.', + 'Your current roles are used to update and start the transform. Starting a transform increases search and indexing load in your cluster. If excessive load is experienced, stop the transform.', })}

diff --git a/x-pack/plugins/transform/public/app/sections/transform_management/components/transform_list/use_columns.tsx b/x-pack/plugins/transform/public/app/sections/transform_management/components/transform_list/use_columns.tsx index 05f8718fc7f78..d823d22d8d789 100644 --- a/x-pack/plugins/transform/public/app/sections/transform_management/components/transform_list/use_columns.tsx +++ b/x-pack/plugins/transform/public/app/sections/transform_management/components/transform_list/use_columns.tsx @@ -160,7 +160,7 @@ export const useColumns = ( 'xpack.transform.transformList.needsReauthorizationBadgeTooltip', { defaultMessage: - 'This transform was created with insufficient permissions. You must have the transform_admin built-in role or manage_transform cluster privileges to reauthorize and start operations.', + 'This transform was created with insufficient permissions. You must have manage_transform cluster privileges to reauthorize and start it.', } )} > diff --git a/x-pack/plugins/transform/public/app/sections/transform_management/transform_management_section.tsx b/x-pack/plugins/transform/public/app/sections/transform_management/transform_management_section.tsx index 19d0fbfbd8ffb..2281d21f738c9 100644 --- a/x-pack/plugins/transform/public/app/sections/transform_management/transform_management_section.tsx +++ b/x-pack/plugins/transform/public/app/sections/transform_management/transform_management_section.tsx @@ -87,7 +87,7 @@ export const TransformManagement: FC = () => { color="warning" title={i18n.translate('xpack.transform.transformList.unauthorizedTransformsCallout', { defaultMessage: - '{unauthorizedCnt, plural, one {A transform was installed but requires} other {# transforms were installed but require}} additional permissions to run. You must have the transform_admin built-in role or manage_transform cluster privileges to reauthorize and start operations.', + '{unauthorizedCnt, plural, one {A transform was installed but requires more permissions to run. You must have manage_transform cluster privileges to start it.} other {# transforms were installed but require more permissions to run. You must have manage_transform cluster privileges to start them.}}', values: { unauthorizedCnt }, })} /> diff --git a/x-pack/plugins/transform/server/routes/api/transforms.ts b/x-pack/plugins/transform/server/routes/api/transforms.ts index e268fbec893f4..c379d0a0d5b0a 100644 --- a/x-pack/plugins/transform/server/routes/api/transforms.ts +++ b/x-pack/plugins/transform/server/routes/api/transforms.ts @@ -304,7 +304,7 @@ export function registerTransformsRoutes(routeDependencies: RouteDependencies) { ); /** - * @apiGroup Reauthorize transforms with API key generated from currently logged in suer + * @apiGroup Reauthorize transforms with API key generated from currently logged in user * @api {post} /api/transform/reauthorize_transforms Post delete transforms * @apiName Reauthorize Transforms * @apiDescription Reauthorize transforms by generating an API Key for current user diff --git a/x-pack/plugins/transform/server/types.ts b/x-pack/plugins/transform/server/types.ts index df8f07a6b2cad..6aa17d59db353 100644 --- a/x-pack/plugins/transform/server/types.ts +++ b/x-pack/plugins/transform/server/types.ts @@ -5,14 +5,14 @@ * 2.0. */ -import { IRouter, CoreStart } from '@kbn/core/server'; -import { PluginStart as DataViewsServerPluginStart } from '@kbn/data-views-plugin/server'; -import { LicensingPluginSetup } from '@kbn/licensing-plugin/server'; -import { PluginSetupContract as FeaturesPluginSetup } from '@kbn/features-plugin/server'; +import type { IRouter, CoreStart } from '@kbn/core/server'; +import type { PluginStart as DataViewsServerPluginStart } from '@kbn/data-views-plugin/server'; +import type { LicensingPluginSetup } from '@kbn/licensing-plugin/server'; +import type { PluginSetupContract as FeaturesPluginSetup } from '@kbn/features-plugin/server'; import type { AlertingPlugin } from '@kbn/alerting-plugin/server'; -import { FieldFormatsSetup, FieldFormatsStart } from '@kbn/field-formats-plugin/server'; -import { SecurityPluginSetup, SecurityPluginStart } from '@kbn/security-plugin/server'; -import { License } from './services'; +import type { FieldFormatsSetup, FieldFormatsStart } from '@kbn/field-formats-plugin/server'; +import type { SecurityPluginSetup, SecurityPluginStart } from '@kbn/security-plugin/server'; +import type { License } from './services'; export interface PluginSetupDependencies { licensing: LicensingPluginSetup;