-
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
[RAC] Use alerting framework to check alert permissions in the UI #113726
Comments
I'm not aware of the implementation on the Observability side and can be mistaken about all the dependencies, but we have code in
|
Pinging @elastic/logs-metrics-ui (Team:logs-metrics-ui) |
@banderror Thanks for this info! It looks promising. I will look into the existing methods and see if I can reuse one for our needs or add a new one. |
@simianhacker is this something we still want to do, and if we do, is this part of AO or the Alerting Framework? |
Looks like it's outdated |
(title to be better defined)
📝 Summary
At the moment Alerts table UI needs to make use of the producer value to determine if workflow status options should be visible to the user or not (
Mark as Acknowledged
andClosed
). In case the value of the consumer isalerts
(this means the rule was created through Stack Management and not through the respective Observability App), then we use the value of the producer to determine alert permissions. In any other case we use the consumer. https://github.com/elastic/kibana/pull/110167/files#diff-f9d2565b68bb75d711c69a2d1c21a6e9c4ced3494068fee60845b93e4eca1895R213 and https://github.com/elastic/kibana/pull/110167/files#diff-f9d2565b68bb75d711c69a2d1c21a6e9c4ced3494068fee60845b93e4eca1895R309Producer refers always to wherever the rule type is registered in the code (
apm
,logs
,infrastructure
etc). Consumer is where the rule instance was created by the end user (alerts
,apm
,logs
,infrastructure
etc). All rules of a given rule type will always have the same producer value. But they can have different consumer values based on where they are created in the UI. #107857Above consumer/producer logic is an implementation detail and shouldn't be exposed to the UI, because it increases the likelihood of bugs. Alerts permissions logic already exists in the alerting framework and should be used to determine the visibility of UI elements. UI shouldn't duplicate this logic as it currently happens in above mentioned lines of code.
✔️ Acceptance criteria
alerts
should be deletedThe text was updated successfully, but these errors were encountered: