mirror of
https://github.com/grafana/grafana.git
synced 2024-12-28 18:01:40 -06:00
Fixed issue with datasource proxying, it required account admin role when it should not
This commit is contained in:
parent
5c795e9a50
commit
c5afcd8e09
@ -2,10 +2,10 @@ package api
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/Unknwon/macaron"
|
"github.com/Unknwon/macaron"
|
||||||
"github.com/macaron-contrib/binding"
|
|
||||||
"github.com/grafana/grafana/pkg/api/dtos"
|
"github.com/grafana/grafana/pkg/api/dtos"
|
||||||
"github.com/grafana/grafana/pkg/middleware"
|
"github.com/grafana/grafana/pkg/middleware"
|
||||||
m "github.com/grafana/grafana/pkg/models"
|
m "github.com/grafana/grafana/pkg/models"
|
||||||
|
"github.com/macaron-contrib/binding"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Register adds http routes
|
// Register adds http routes
|
||||||
@ -72,9 +72,10 @@ func Register(r *macaron.Macaron) {
|
|||||||
r.Group("/datasources", func() {
|
r.Group("/datasources", func() {
|
||||||
r.Combo("/").Get(GetDataSources).Put(AddDataSource).Post(UpdateDataSource)
|
r.Combo("/").Get(GetDataSources).Put(AddDataSource).Post(UpdateDataSource)
|
||||||
r.Delete("/:id", DeleteDataSource)
|
r.Delete("/:id", DeleteDataSource)
|
||||||
r.Any("/proxy/:id/*", reqSignedIn, ProxyDataSourceRequest)
|
|
||||||
}, reqAccountAdmin)
|
}, reqAccountAdmin)
|
||||||
|
|
||||||
|
r.Any("/datasources/proxy/:id/*", reqSignedIn, ProxyDataSourceRequest)
|
||||||
|
|
||||||
// Dashboard
|
// Dashboard
|
||||||
r.Group("/dashboards", func() {
|
r.Group("/dashboards", func() {
|
||||||
r.Combo("/db/:slug").Get(GetDashboard).Delete(DeleteDashboard)
|
r.Combo("/db/:slug").Get(GetDashboard).Delete(DeleteDashboard)
|
||||||
|
Loading…
Reference in New Issue
Block a user