made it possible to have frontend code in symlinked folders that can add routes

This commit is contained in:
Torkel Ödegaard
2018-10-11 12:36:04 +02:00
parent 5b46c08844
commit abef94b0da
10 changed files with 36 additions and 92 deletions
+7
View File
@@ -14,6 +14,13 @@ import (
"github.com/grafana/grafana/pkg/util"
)
var (
ReqGrafanaAdmin = Auth(&AuthOptions{ReqSignedIn: true, ReqGrafanaAdmin: true})
ReqSignedIn = Auth(&AuthOptions{ReqSignedIn: true})
ReqEditorRole = RoleAuth(m.ROLE_EDITOR, m.ROLE_ADMIN)
ReqOrgAdmin = RoleAuth(m.ROLE_ADMIN)
)
func GetContextHandler() macaron.Handler {
return func(c *macaron.Context) {
ctx := &m.ReqContext{