* WIP: Fix XSS in runbook URL (#378)
(cherry picked from commit f4a8d96a4e1259ea25d9cc702a652f1b819db236)
(cherry picked from commit 337c08507b2b1c78ea470192d34cf611fae4b5da)
(cherry picked from commit 54b36a07406ed4e26ff8e161e50eda5401f504da)
* Update grabpl version
(cherry picked from commit b253e87d730f7b8aabdd0b328c5e7a82547c43b3)
(cherry picked from commit 080d3e46f3fcd61555795b9fe8fd6ee2492b422a)
* sign drone.yml
* Fix: Choose Lookup params per auth module
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
Fix: Prefer pointer to struct in lookup
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
Fix: user email for ldap
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
Fix: Use only login for lookup in LDAP
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
Fix: use user email for ldap
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
fix remaining test
fix nit picks
(cherry picked from commit 1eca4aeed878853743cebcf9790b05dd350c4f83)
(cherry picked from commit 0777d100e9263d08f51dbac71aee0766c8a85a92)
Co-authored-by: George Robinson <george.robinson@grafana.com>
Co-authored-by: dsotirakis <sotirakis.dim@gmail.com>
Co-authored-by: Kevin Minehart <kmineh0151@gmail.com>
Co-authored-by: jguer <joao.guerreiro@grafana.com>
without setting function map from alertmanager we receive error:
method=PUT path=/api/v1/provisioning/templates/slack.message status=400
level=error msg="invalid object specification: invalid template: template: :1: function \"toUpper\" not defined"
So for validation we should use the same settings as alertmanager do
for templates internally.
(cherry picked from commit b54da68765)
Co-authored-by: Michał Zielonka <michal.zielonka.8001@gmail.com>
This commit fixes a bug where the state did not change from Alerting to Error if the evaluation result returned an error, or from Error to Alerting if evaluations stopped returning errors.
(cherry picked from commit 34d45977ca)
Co-authored-by: George Robinson <george.robinson@grafana.com>
Put the ClickOutsideWrapper further out in the PanelHeader, so it doesn't catch itself when clicking on the panel header above the menu;
co-authored with @glintik
(cherry picked from commit 556f312b00)
* Alerting: Provisioning API respects global rule quota (#52180)
* Inject interface for quota service and create mock
* Check quota and return 403 if limit exceeded
* Implement tests for quota being exceeded
(cherry picked from commit 2d7389c34d)
* backport error check
Co-authored-by: Jean-Philippe Quémémer <jeanphilippe.quemener@grafana.com>
/api/admin/pause-all-alerts only takes effect for legacy alerts. This
change returns a 403 if it's called when legacy alerting is disabled.
Fixes#51729
(cherry picked from commit 0cbc14961a)
Co-authored-by: Joe Blubaugh <joe.blubaugh@grafana.com>
* SQLstore: Fix fetching and deleting an inexistent playlist
xorm's session.Get() does not return an error if the raw does not exist.
It returns a boolean instead.
The playlist `sqlstore.GetPlaylist()` used to check only the error and in case
of inexistent UID didn't return an error.
(cherry picked from commit 4ff0f006dd)
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
* Define query param and regenerate
* Add query struct for contact points
* Filter contact points by name in query
* Document that name filter is optional
(cherry picked from commit 0e066dd5f8)
Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
* Define route and run codegen
* Wire up HTTP layer
* Update API layer and test fakes
* Implement reset of policy tree
* Implement service layer test and authorization bindings
* API layer testing
* Be more specific when injecting settings
(cherry picked from commit fce283d73e)
Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
* Rendering: Fix user information when using render key
* fix when render user ID is 0
* update fix
* improve fix
* add comment
(cherry picked from commit ca80865bf1)
Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>