-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Hide timeline bar if user does not have security solution crud capability #123775
Hide timeline bar if user does not have security solution crud capability #123775
Conversation
Pinging @elastic/security-threat-hunting (Team:Threat Hunting) |
Pinging @elastic/security-solution (Team: SecuritySolution) |
Hey, @paulewing @monina-n, I wasnt sure if a user only has Read permission, if they should be able to see the bottom bar. Currently if they do have read permissions to SecuritySolution, they do see the timeline bottom bar on most pages, as they would if they had full crud capability. I want to make sure this is expected. My changes prevent a user with no read or write capability from seeing the timeline bar. |
b3f71f7
to
2313a49
Compare
bottomBar={ | ||
userHasSecuritySolutionVisible ? ( | ||
<SecuritySolutionBottomBar onAppLeave={onAppLeave} /> | ||
) : ( |
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.
NIT: the bottomBar
property is optional, we could also omit the prop or just pass undefined
, instead of the empty fragment
Hey @jamster10, yes I agree we should make a decision about what to do with the timeline if the user only has the
Gravacio.de.pantalla.2022-01-26.a.les.12.57.27.movIf we are going to allow
Gravacio.de.pantalla.2022-01-26.a.les.12.58.59.movIf we are going to allow @paulewing @monina-n What do you think? cc @YulNaumenko |
💚 Build SucceededMetrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: cc @jamster10 |
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! 👌
Let's fix the "read-only" problems in another PR.
…lity (elastic#123775) * Hide timeline bar if user does not have security solution crud capability * change visibility to be based on show instead of crud * PR fix Co-authored-by: Kristof-Pierre Cummings <[email protected]>
Friendly reminder: Looks like this PR hasn’t been backported yet. |
2 similar comments
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
12 similar comments
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
…lity (elastic#123775) * Hide timeline bar if user does not have security solution crud capability * change visibility to be based on show instead of crud * PR fix Co-authored-by: Kristof-Pierre Cummings <[email protected]> (cherry picked from commit 5aa26ed)
…lity (#123775) (#126289) * Hide timeline bar if user does not have security solution crud capability * change visibility to be based on show instead of crud * PR fix Co-authored-by: Kristof-Pierre Cummings <[email protected]> (cherry picked from commit 5aa26ed) Co-authored-by: Kristof C <[email protected]>
#122207
Summary
If a user does not have
show
capability for Security Solution from role permissions, but they do have access to cases (within Security Solution), they should not be able to interact with the bottom bar (Timelines).As such, the bottom bar is now wrapped in a conditional to perform the check noted above.
A user with Cases but no
show
security solution permissions:Before:
After:
Checklist
Delete any items that are not applicable to this PR.