-
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
[RAM] Disable rule status dropdown on readonly user #128971
Conversation
Pinging @elastic/response-ops (Team:ResponseOps) |
# Conflicts: # x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rule_status_dropdown.test.tsx # x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rule_status_dropdown.tsx # x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list.tsx
💚 Build SucceededMetrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
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 too sure about the designs, but code wise, LGTM!
@@ -60,6 +61,7 @@ export const RuleStatusDropdown: React.FunctionComponent<ComponentOpts> = ({ | |||
enableRule, | |||
snoozeRule, | |||
unsnoozeRule, | |||
isEditable, |
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.
should this default to true?
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.
I prefer making it a required prop. We shouldn't be using this component in any context where we can't determine if the rule is editable or not.
💔 All backports failed
Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation |
* [RAM] Disable rule status dropdown on readonly user * Add test for readonly dropdown (cherry picked from commit 70fa265) # Conflicts: # x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rule_status_dropdown.test.tsx # x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rule_status_dropdown.tsx # x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list.tsx
…129270) * [RAM] Disable rule status dropdown on readonly user (#128971) * [RAM] Disable rule status dropdown on readonly user * Add test for readonly dropdown (cherry picked from commit 70fa265) # Conflicts: # x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rule_status_dropdown.test.tsx # x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rule_status_dropdown.tsx # x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list.tsx * Remove previousSnoozeInterval * remove previousSnoozeInterval * remove previousSnoozeInterval * remove previousSnoozeInterval Co-authored-by: Xavier Mouligneau <xavier.mouligneau@elastic.co>
Summary
Fixes #128672
When logged in as a read-only user, the Enable/Disable/Snooze control will just be a normal badge, and won't open a dropdown.
Checklist