Skip to content

Commit

Permalink
[Logs App] Fix logs permissions for alert management (#81199) (#82053)
Browse files Browse the repository at this point in the history
* 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 <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
  • Loading branch information
jasonrhodes and kibanamachine authored Oct 29, 2020
1 parent 21286e7 commit 68e85c4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions x-pack/plugins/infra/server/features.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ export const LOGS_FEATURE = {
category: DEFAULT_APP_CATEGORIES.observability,
app: ['infra', 'logs', 'kibana'],
catalogue: ['infralogging', 'logs'],
management: {
insightsAndAlerting: ['triggersActions'],
},
alerting: [LOG_DOCUMENT_COUNT_ALERT_TYPE_ID],
privileges: {
all: {
Expand All @@ -81,6 +84,9 @@ export const LOGS_FEATURE = {
alerting: {
all: [LOG_DOCUMENT_COUNT_ALERT_TYPE_ID],
},
management: {
insightsAndAlerting: ['triggersActions'],
},
ui: ['show', 'configureSource', 'save'],
},
read: {
Expand All @@ -90,6 +96,9 @@ export const LOGS_FEATURE = {
alerting: {
read: [LOG_DOCUMENT_COUNT_ALERT_TYPE_ID],
},
management: {
insightsAndAlerting: ['triggersActions'],
},
savedObject: {
all: [],
read: ['infrastructure-ui-source'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {

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

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

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

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

0 comments on commit 68e85c4

Please sign in to comment.