mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[Security Solution] - remove alerts subfeature UI from behind feature flag (#108450)
### Summary This removes the feature flag check for showing the alerts subfeature under security solution Kibana roles UI.
This commit is contained in:
parent
a7661a553c
commit
94d16f8882
3 changed files with 15 additions and 13 deletions
|
@ -76,7 +76,7 @@ export const getAlertsSubFeature = (ruleTypes: string[]): SubFeatureConfig => ({
|
|||
all: [],
|
||||
read: [],
|
||||
},
|
||||
ui: [],
|
||||
ui: ['crud_alerts', 'read_alerts'],
|
||||
},
|
||||
{
|
||||
id: 'alerts_read',
|
||||
|
@ -93,17 +93,14 @@ export const getAlertsSubFeature = (ruleTypes: string[]): SubFeatureConfig => ({
|
|||
all: [],
|
||||
read: [],
|
||||
},
|
||||
ui: [],
|
||||
ui: ['read_alerts'],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
export const getKibanaPrivilegesFeaturePrivileges = (
|
||||
ruleTypes: string[],
|
||||
isRuleRegistryEnabled: boolean
|
||||
): KibanaFeatureConfig => ({
|
||||
export const getKibanaPrivilegesFeaturePrivileges = (ruleTypes: string[]): KibanaFeatureConfig => ({
|
||||
id: SERVER_APP_ID,
|
||||
name: i18n.translate('xpack.securitySolution.featureRegistry.linkSecuritySolutionTitle', {
|
||||
defaultMessage: 'Security',
|
||||
|
@ -117,9 +114,7 @@ export const getKibanaPrivilegesFeaturePrivileges = (
|
|||
},
|
||||
alerting: ruleTypes,
|
||||
cases: [APP_ID],
|
||||
subFeatures: isRuleRegistryEnabled
|
||||
? [{ ...CASES_SUB_FEATURE }, { ...getAlertsSubFeature(ruleTypes) }]
|
||||
: [{ ...CASES_SUB_FEATURE }],
|
||||
subFeatures: [{ ...CASES_SUB_FEATURE }, { ...getAlertsSubFeature(ruleTypes) }],
|
||||
privileges: {
|
||||
all: {
|
||||
app: [APP_ID, 'kibana'],
|
||||
|
|
|
@ -310,9 +310,7 @@ export class Plugin implements IPlugin<PluginSetup, PluginStart, SetupPlugins, S
|
|||
...(isRuleRegistryEnabled ? racRuleTypes : []),
|
||||
];
|
||||
|
||||
plugins.features.registerKibanaFeature(
|
||||
getKibanaPrivilegesFeaturePrivileges(ruleTypes, isRuleRegistryEnabled)
|
||||
);
|
||||
plugins.features.registerKibanaFeature(getKibanaPrivilegesFeaturePrivileges(ruleTypes));
|
||||
|
||||
// Continue to register legacy rules against alerting client exposed through rule-registry
|
||||
if (this.setupPlugins.alerting != null) {
|
||||
|
|
|
@ -32,7 +32,16 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
actions: ['all', 'read'],
|
||||
stackAlerts: ['all', 'read'],
|
||||
ml: ['all', 'read'],
|
||||
siem: ['all', 'read', 'minimal_all', 'minimal_read', 'cases_all', 'cases_read'],
|
||||
siem: [
|
||||
'all',
|
||||
'read',
|
||||
'minimal_all',
|
||||
'minimal_read',
|
||||
'cases_all',
|
||||
'cases_read',
|
||||
'alerts_all',
|
||||
'alerts_read',
|
||||
],
|
||||
observabilityCases: ['all', 'read'],
|
||||
uptime: ['all', 'read'],
|
||||
infrastructure: ['all', 'read'],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue