grafana/pkg/services/libraryelements/model
Roberto Jiménez Sánchez fcefd6fff9
LibraryPanels: Return 403 instead of 500 for insufficient permissions (#123407)
* LibraryPanels: Return 403 instead of 500 for insufficient permissions

Library element creation previously returned an untyped fmt.Errorf
containing "insufficient permissions", which the library elements API
mapped to 403 via a string match but which fell through to a generic
500 in the dashboard import handler. Make the error a typed
errutil.Forbidden so callers such as /api/dashboards/import propagate
the correct HTTP status.

Fixes gz#225599

* fixup! LibraryPanels: Return 403 instead of 500 for insufficient permissions
2026-04-24 10:01:54 +03:00
..
model.go LibraryPanels: Return 403 instead of 500 for insufficient permissions (#123407) 2026-04-24 10:01:54 +03:00