Alerting: Fix fine-grained rule access control to use 403 for authorization error (#79239)
* use 403 for authorization error * update silences API * add ForbiddenError to rule API responses
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package definitions
|
||||
|
||||
import "github.com/grafana/grafana/pkg/util/errutil"
|
||||
|
||||
// swagger:model
|
||||
type NotFound struct{}
|
||||
|
||||
@@ -11,3 +13,10 @@ type ValidationError struct {
|
||||
// example: error message
|
||||
Msg string `json:"msg"`
|
||||
}
|
||||
|
||||
// swagger:model
|
||||
type ForbiddenError struct {
|
||||
// The response message
|
||||
// in: body
|
||||
Body errutil.PublicError `json:"body"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user