Skip to content

Commit cc4e836

Browse files
[Logs App] Fix logs permissions for alert management (#81199) (#82054)
* Mimics metrics permissions for alert mgmt in logs feature * Updates logs security functional tests Alert management permissions were added for read and all logs users in this PR, so both of these users now have "Stack Management" appear in the nav. Co-authored-by: Kibana Machine <[email protected]> Co-authored-by: Kibana Machine <[email protected]>
1 parent 60b9308 commit cc4e836

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

x-pack/plugins/infra/server/features.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ export const LOGS_FEATURE = {
7272
navLinkId: 'logs',
7373
app: ['infra', 'logs', 'kibana'],
7474
catalogue: ['infralogging', 'logs'],
75+
management: {
76+
insightsAndAlerting: ['triggersActions'],
77+
},
7578
alerting: [LOG_DOCUMENT_COUNT_ALERT_TYPE_ID],
7679
privileges: {
7780
all: {
@@ -85,6 +88,9 @@ export const LOGS_FEATURE = {
8588
alerting: {
8689
all: [LOG_DOCUMENT_COUNT_ALERT_TYPE_ID],
8790
},
91+
management: {
92+
insightsAndAlerting: ['triggersActions'],
93+
},
8894
ui: ['show', 'configureSource', 'save'],
8995
},
9096
read: {
@@ -94,6 +100,9 @@ export const LOGS_FEATURE = {
94100
alerting: {
95101
read: [LOG_DOCUMENT_COUNT_ALERT_TYPE_ID],
96102
},
103+
management: {
104+
insightsAndAlerting: ['triggersActions'],
105+
},
97106
savedObject: {
98107
all: [],
99108
read: ['infrastructure-ui-source'],

x-pack/test/functional/apps/infra/feature_controls/logs_security.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
5858

5959
it('shows logs navlink', async () => {
6060
const navLinks = (await appsMenu.readLinks()).map((link) => link.text);
61-
expect(navLinks).to.eql(['Overview', 'Logs']);
61+
expect(navLinks).to.eql(['Overview', 'Logs', 'Stack Management']);
6262
});
6363

6464
describe('logs landing page without data', () => {
@@ -121,7 +121,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
121121

122122
it('shows logs navlink', async () => {
123123
const navLinks = (await appsMenu.readLinks()).map((link) => link.text);
124-
expect(navLinks).to.eql(['Overview', 'Logs']);
124+
expect(navLinks).to.eql(['Overview', 'Logs', 'Stack Management']);
125125
});
126126

127127
describe('logs landing page without data', () => {

0 commit comments

Comments
 (0)