-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Set the perspective to security if user has security overview startpage #23874
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added two comments, requesting changes just for the second one (fixing the linter hint).
} | ||
|
||
redirect(activePerspective.welcomeRoute); | ||
}, [activePerspective, currentUser?.startpage, redirect]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we address this linter hint before merge?
} else if (startPage.type === 'stream') { | ||
redirect(Routes.stream_search(startPage.id)); | ||
} else if (startPage.type === 'graylog_security_welcome') { | ||
setActivePerspective('security'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not fixable within this PR, but I want to leave it here for future refactorings: This should not be here, as it couples core and enterprise/security. Instead, we should make this pluggable, so any plugin can register handlers for the types of start pages they are maintaining.
We redirect the user to the security overview but don't set the active perspective to
security
which makes the home button take the user back to the general perspective welcome page.Closes https://github.com/Graylog2/graylog-plugin-enterprise/issues/12032
/nocl
How Has This Been Tested?
Local env
Types of changes
Checklist: