Skip to content
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

[v10.1.x] Alerting: Prevent showing "Permissions denied" alert when not accurate #74925

Merged
merged 1 commit into from
Sep 14, 2023

Conversation

grafana-delivery-bot[bot]
Copy link
Contributor

Backport db2295b from #74887


What is this feature?

Users without org admin role were shown a "Permissions denied" alert in the creation/edition rule form even though they had access to create/edit the rule. The problem came after the NotificationPreview component made a request to /api/v1/ngalert/alertmanagers in order to obtain external alertmanagers information which is an endpoint that requires that permission level.
Turns out we don't actually need to call that endpoint to obtain that information.

Why do we need this feature?

To prevent showing the "Permissions denied" alert which is confusing and inaccurate.

Who is this feature for?

All users without org admin access.

Which issue(s) does this PR fix?:

Related to https://github.com/grafana/support-escalations/issues/7303

Before
2023-09-13 19 01 57

After
2023-09-13 19 00 45

#74887)

* Change way of obtaining external datasources info

* Remove unneeded import

* Create function to getExternalDsAlertManagers in datasource srv

* Remove unused import

(cherry picked from commit db2295b)
@VikaCep VikaCep merged commit 8972a1b into v10.1.x Sep 14, 2023
18 checks passed
@VikaCep VikaCep deleted the backport-74887-to-v10.1.x branch September 14, 2023 14:55
@marinnedea
Copy link
Contributor

@VikaCep - hi, is this included in any release at the moment, or just merged? Thank you!

@zerok zerok modified the milestones: 10.1.x, 10.1.3 Sep 19, 2023
@zerok zerok modified the milestones: 10.1.3, 10.1.5 Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants