Remove APM Alerts subfeature privilege (#113469)

This was not being used (`alerts_all` and `alerts_read`) and will not be used in the future and can be safely removed.

Fixes #112274.
This commit is contained in:
Nathan L Smith 2021-10-05 08:19:46 -05:00 committed by GitHub
parent 81046f171e
commit 433a0e3927
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 62 deletions

View file

@ -6,7 +6,6 @@
*/
import { i18n } from '@kbn/i18n';
import { SubFeaturePrivilegeGroupType } from '../../features/common';
import { LicenseType } from '../../licensing/common/types';
import { AlertType, APM_SERVER_FEATURE_ID } from '../common/alert_types';
import { DEFAULT_APP_CATEGORIES } from '../../../../src/core/server';
@ -39,6 +38,9 @@ export const APM_FEATURE = {
read: [],
},
alerting: {
alert: {
all: Object.values(AlertType),
},
rule: {
all: Object.values(AlertType),
},
@ -57,6 +59,9 @@ export const APM_FEATURE = {
read: [],
},
alerting: {
alert: {
read: Object.values(AlertType),
},
rule: {
read: Object.values(AlertType),
},
@ -67,60 +72,6 @@ export const APM_FEATURE = {
ui: ['show', 'alerting:show'],
},
},
subFeatures: [
{
name: i18n.translate('xpack.apm.featureRegistry.manageAlertsName', {
defaultMessage: 'Alerts',
}),
privilegeGroups: [
{
groupType: 'mutually_exclusive' as SubFeaturePrivilegeGroupType,
privileges: [
{
id: 'alerts_all',
name: i18n.translate(
'xpack.apm.featureRegistry.subfeature.alertsAllName',
{
defaultMessage: 'All',
}
),
includeIn: 'all' as 'all',
alerting: {
alert: {
all: Object.values(AlertType),
},
},
savedObject: {
all: [],
read: [],
},
ui: [],
},
{
id: 'alerts_read',
name: i18n.translate(
'xpack.apm.featureRegistry.subfeature.alertsReadName',
{
defaultMessage: 'Read',
}
),
includeIn: 'read' as 'read',
alerting: {
alert: {
read: Object.values(AlertType),
},
},
savedObject: {
all: [],
read: [],
},
ui: [],
},
],
},
],
},
],
};
interface Feature {

View file

@ -6310,9 +6310,6 @@
"xpack.apm.exactTransactionRateLabel": "{value} { unit, select, minute {tpm} other {tps} }",
"xpack.apm.failedTransactionsCorrelations.licenseCheckText": "失敗したトランザクションの相関関係機能を使用するには、Elastic Platinumライセンスのサブスクリプションが必要です。",
"xpack.apm.featureRegistry.apmFeatureName": "APMおよびユーザーエクスペリエンス",
"xpack.apm.featureRegistry.manageAlertsName": "アラート",
"xpack.apm.featureRegistry.subfeature.alertsAllName": "すべて",
"xpack.apm.featureRegistry.subfeature.alertsReadName": "読み取り",
"xpack.apm.feedbackMenu.appName": "APM",
"xpack.apm.fetcher.error.status": "エラー",
"xpack.apm.fetcher.error.title": "リソースの取得中にエラーが発生しました",

View file

@ -6359,9 +6359,6 @@
"xpack.apm.exactTransactionRateLabel": "{value} { unit, select, minute {tpm} other {tps} }",
"xpack.apm.failedTransactionsCorrelations.licenseCheckText": "要使用失败事务相关性功能,必须订阅 Elastic 白金级许可证。",
"xpack.apm.featureRegistry.apmFeatureName": "APM 和用户体验",
"xpack.apm.featureRegistry.manageAlertsName": "告警",
"xpack.apm.featureRegistry.subfeature.alertsAllName": "全部",
"xpack.apm.featureRegistry.subfeature.alertsReadName": "读取",
"xpack.apm.feedbackMenu.appName": "APM",
"xpack.apm.fetcher.error.status": "错误",
"xpack.apm.fetcher.error.title": "提取资源时出错",

View file

@ -37,7 +37,7 @@ export default function ({ getService }: FtrProviderContext) {
securitySolutionCases: ['all', 'read'],
infrastructure: ['all', 'read'],
logs: ['all', 'read'],
apm: ['all', 'read', 'minimal_all', 'minimal_read', 'alerts_all', 'alerts_read'],
apm: ['all', 'read'],
discover: [
'all',
'read',