[v8.5.x] Alerting: Fix access to alerts for viewer with editor permissions when RBAC is disabled (#49427)
* Alerting: Fix access to alerts for viewer with editor permissions when RBAC is disabled (#49270)
* Add folder edit permission for users with Viewer role
* relax permissions required to create an alert when RBAC is disabled
(cherry picked from commit 3dfafbadef)
* fix backend conflict
* fixup
Co-authored-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>
This commit is contained in:
co-authored by
Yuriy Tseretyan
parent
ccab3e7e0f
commit
46ea845720
@@ -611,7 +611,7 @@ func TestRulerAccess(t *testing.T) {
|
||||
desc: "viewer request should fail",
|
||||
url: "http://viewer:viewer@%s/api/ruler/grafana/api/v1/rules/default",
|
||||
expStatus: http.StatusForbidden,
|
||||
expectedResponse: `{"message": "Permission denied"}`,
|
||||
expectedResponse: `{"message":"user does not have permissions to edit the namespace: user does not have permissions to edit the namespace", "traceID":"00000000000000000000000000000000"}`,
|
||||
},
|
||||
{
|
||||
desc: "editor request should succeed",
|
||||
|
||||
Reference in New Issue
Block a user