move Context and session out of middleware
This commit is contained in:
@@ -5,13 +5,12 @@ import (
|
||||
|
||||
"github.com/grafana/grafana/pkg/api/dtos"
|
||||
"github.com/grafana/grafana/pkg/bus"
|
||||
"github.com/grafana/grafana/pkg/middleware"
|
||||
m "github.com/grafana/grafana/pkg/models"
|
||||
"github.com/grafana/grafana/pkg/services/dashboards"
|
||||
"github.com/grafana/grafana/pkg/services/guardian"
|
||||
)
|
||||
|
||||
func GetFolderPermissionList(c *middleware.Context) Response {
|
||||
func GetFolderPermissionList(c *m.Context) Response {
|
||||
s := dashboards.NewFolderService(c.OrgId, c.SignedInUser)
|
||||
folder, err := s.GetFolderByUid(c.Params(":uid"))
|
||||
|
||||
@@ -42,7 +41,7 @@ func GetFolderPermissionList(c *middleware.Context) Response {
|
||||
return Json(200, acl)
|
||||
}
|
||||
|
||||
func UpdateFolderPermissions(c *middleware.Context, apiCmd dtos.UpdateDashboardAclCommand) Response {
|
||||
func UpdateFolderPermissions(c *m.Context, apiCmd dtos.UpdateDashboardAclCommand) Response {
|
||||
s := dashboards.NewFolderService(c.OrgId, c.SignedInUser)
|
||||
folder, err := s.GetFolderByUid(c.Params(":uid"))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user