-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Expand file tree
/
Copy pathfeatures.ts
More file actions
155 lines (153 loc) · 6.2 KB
/
features.ts
File metadata and controls
155 lines (153 loc) · 6.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
/*
* 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", the "GNU Affero General Public License v3.0 only", and the "Server Side
* Public License v 1"; you may not use this file except in compliance with, at
* your election, the "Elastic License 2.0", the "GNU Affero General Public
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import { DEFAULT_APP_CATEGORIES } from '@kbn/core-application-common';
import type { KibanaFeatureConfig } from '@kbn/features-plugin/common';
import { i18n } from '@kbn/i18n';
import {
WORKFLOWS_MANAGEMENT_FEATURE_ID,
WorkflowsManagementApiActions,
WorkflowsManagementUiActions,
} from '@kbn/workflows';
// The kibana feature configuration for the Workflows Management plugin.
export const WorkflowsManagementFeatureConfig: KibanaFeatureConfig = {
id: WORKFLOWS_MANAGEMENT_FEATURE_ID,
name: i18n.translate(
'platform.plugins.shared.workflows_management.featureRegistry.workflowsManagementFeatureName',
{ defaultMessage: 'Workflows' }
),
category: DEFAULT_APP_CATEGORIES.kibana,
app: [],
order: 3000,
minimumLicense: 'enterprise',
privileges: {
// Nothing at top level privileges, all specific actions are managed by sub_features privileges below
all: { app: [], api: [], savedObject: { all: [], read: [] }, ui: [] },
read: { app: [], api: [], savedObject: { all: [], read: [] }, ui: [] },
},
subFeatures: [
{
name: i18n.translate(
'platform.plugins.shared.workflows_management.featureRegistry.workflowsManagementSubFeatureName',
{ defaultMessage: 'Workflows Actions' }
),
privilegeGroups: [
{
groupType: 'independent',
privileges: [
{
id: 'workflow_create',
name: i18n.translate(
'platform.plugins.shared.workflows_management.featureRegistry.createWorkflowSubFeaturePrivilege',
{ defaultMessage: 'Create' }
),
includeIn: 'all',
savedObject: { all: [], read: [] },
api: [WorkflowsManagementApiActions.create],
ui: [WorkflowsManagementUiActions.create],
},
{
id: 'workflow_update',
name: i18n.translate(
'platform.plugins.shared.workflows_management.featureRegistry.updateWorkflowSubFeaturePrivilege',
{ defaultMessage: 'Update' }
),
includeIn: 'all',
savedObject: { all: [], read: [] },
api: [WorkflowsManagementApiActions.update],
ui: [WorkflowsManagementUiActions.update],
},
{
id: 'workflow_delete',
name: i18n.translate(
'platform.plugins.shared.workflows_management.featureRegistry.deleteWorkflowSubFeaturePrivilege',
{ defaultMessage: 'Delete' }
),
includeIn: 'all',
savedObject: { all: [], read: [] },
api: [WorkflowsManagementApiActions.delete],
ui: [WorkflowsManagementUiActions.delete],
},
{
id: 'workflow_execute',
name: i18n.translate(
'platform.plugins.shared.workflows_management.featureRegistry.executeWorkflowSubFeaturePrivilege',
{ defaultMessage: 'Execute' }
),
includeIn: 'all',
savedObject: { all: [], read: [] },
api: [WorkflowsManagementApiActions.execute],
ui: [WorkflowsManagementUiActions.execute],
},
{
id: 'workflow_read',
name: i18n.translate(
'platform.plugins.shared.workflows_management.featureRegistry.readWorkflowSubFeaturePrivilege',
{ defaultMessage: 'Read' }
),
includeIn: 'read',
savedObject: { all: [], read: [] },
api: [WorkflowsManagementApiActions.read],
ui: [WorkflowsManagementUiActions.read],
},
{
id: 'workflow_execution_read',
name: i18n.translate(
'platform.plugins.shared.workflows_management.featureRegistry.readWorkflowExecutionSubFeaturePrivilege',
{ defaultMessage: 'Read Workflow Execution' }
),
includeIn: 'read',
savedObject: { all: [], read: [] },
api: [WorkflowsManagementApiActions.readExecution],
ui: [WorkflowsManagementUiActions.readExecution],
},
{
id: 'workflow_execution_cancel',
name: i18n.translate(
'platform.plugins.shared.workflows_management.featureRegistry.cancelWorkflowExecutionSubFeaturePrivilege',
{ defaultMessage: 'Cancel Workflow Execution' }
),
includeIn: 'all',
savedObject: { all: [], read: [] },
api: [WorkflowsManagementApiActions.cancelExecution],
ui: [WorkflowsManagementUiActions.cancelExecution],
},
],
},
],
},
{
name: i18n.translate(
'platform.plugins.shared.workflows_management.featureRegistry.managedWorkflowsSubFeatureName',
{ defaultMessage: 'Managed Workflows Actions' }
),
description: i18n.translate(
'platform.plugins.shared.workflows_management.featureRegistry.managedWorkflowsSubFeatureDescription',
{ defaultMessage: 'Managed workflow actions need explicit assignment' }
),
privilegeGroups: [
{
groupType: 'independent',
privileges: [
{
id: 'workflow_update_managed',
name: i18n.translate(
'platform.plugins.shared.workflows_management.featureRegistry.updateManagedWorkflowsSubFeaturePrivilege',
{ defaultMessage: 'Update managed workflows' }
),
includeIn: 'none',
savedObject: { all: [], read: [] },
api: [WorkflowsManagementApiActions.updateManaged],
ui: [],
},
],
},
],
},
],
};