Access control: Display inherited folder permissions in dashboards (#46421)

This commit is contained in:
Karl Persson
2022-03-17 17:08:51 +01:00
committed by GitHub
parent fb17b9f545
commit 4df7bf5ab2
13 changed files with 142 additions and 129 deletions
@@ -1,7 +1,6 @@
package resourcepermissions
import (
"context"
"net/http"
"strconv"
@@ -10,9 +9,7 @@ import (
"github.com/grafana/grafana/pkg/web"
)
type uidSolver func(ctx context.Context, orgID int64, uid string) (int64, error)
func solveUID(solve uidSolver) web.Handler {
func solveUID(solve UidSolver) web.Handler {
return func(c *models.ReqContext) {
if solve != nil && util.IsValidShortUID(web.Params(c.Req)[":resourceID"]) {
params := web.Params(c.Req)