فهرست منبع

Fixed issue with datasource proxying, it required account admin role when it should not

Torkel Ödegaard 11 سال پیش
والد
کامیت
c5afcd8e09
1فایلهای تغییر یافته به همراه3 افزوده شده و 2 حذف شده
  1. 3 2
      pkg/api/api.go

+ 3 - 2
pkg/api/api.go

@@ -2,10 +2,10 @@ package api
 
 import (
 	"github.com/Unknwon/macaron"
-	"github.com/macaron-contrib/binding"
 	"github.com/grafana/grafana/pkg/api/dtos"
 	"github.com/grafana/grafana/pkg/middleware"
 	m "github.com/grafana/grafana/pkg/models"
+	"github.com/macaron-contrib/binding"
 )
 
 // Register adds http routes
@@ -72,9 +72,10 @@ func Register(r *macaron.Macaron) {
 		r.Group("/datasources", func() {
 			r.Combo("/").Get(GetDataSources).Put(AddDataSource).Post(UpdateDataSource)
 			r.Delete("/:id", DeleteDataSource)
-			r.Any("/proxy/:id/*", reqSignedIn, ProxyDataSourceRequest)
 		}, reqAccountAdmin)
 
+		r.Any("/datasources/proxy/:id/*", reqSignedIn, ProxyDataSourceRequest)
+
 		// Dashboard
 		r.Group("/dashboards", func() {
 			r.Combo("/db/:slug").Get(GetDashboard).Delete(DeleteDashboard)