* [sec/actions] move constants to a separate file to avoid circular deps * split out setupSavedObjects import * remove unused import Co-authored-by: spalger <spalger@users.noreply.github.com>
55 lines
1.5 KiB
TypeScript
55 lines
1.5 KiB
TypeScript
/*
|
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
* 2.0; you may not use this file except in compliance with the Elastic License
|
|
* 2.0.
|
|
*/
|
|
|
|
import { i18n } from '@kbn/i18n';
|
|
import {
|
|
ACTION_SAVED_OBJECT_TYPE,
|
|
ACTION_TASK_PARAMS_SAVED_OBJECT_TYPE,
|
|
} from './constants/saved_objects';
|
|
import { DEFAULT_APP_CATEGORIES } from '../../../../src/core/server';
|
|
|
|
export const ACTIONS_FEATURE = {
|
|
id: 'actions',
|
|
name: i18n.translate('xpack.actions.featureRegistry.actionsFeatureName', {
|
|
defaultMessage: 'Actions and Connectors',
|
|
}),
|
|
category: DEFAULT_APP_CATEGORIES.management,
|
|
app: [],
|
|
management: {
|
|
insightsAndAlerting: ['triggersActions'],
|
|
},
|
|
privileges: {
|
|
all: {
|
|
app: [],
|
|
api: [],
|
|
catalogue: [],
|
|
management: {
|
|
insightsAndAlerting: ['triggersActions'],
|
|
},
|
|
savedObject: {
|
|
all: [ACTION_SAVED_OBJECT_TYPE, ACTION_TASK_PARAMS_SAVED_OBJECT_TYPE],
|
|
read: [],
|
|
},
|
|
ui: ['show', 'execute', 'save', 'delete'],
|
|
},
|
|
read: {
|
|
app: [],
|
|
api: [],
|
|
catalogue: [],
|
|
management: {
|
|
insightsAndAlerting: ['triggersActions'],
|
|
},
|
|
savedObject: {
|
|
// action execution requires 'read' over `actions`, but 'all' over `action_task_params`
|
|
all: [ACTION_TASK_PARAMS_SAVED_OBJECT_TYPE],
|
|
read: [ACTION_SAVED_OBJECT_TYPE],
|
|
},
|
|
ui: ['show', 'execute'],
|
|
},
|
|
},
|
|
};
|