mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
parent
9256ca371d
commit
db0be6bc95
@ -203,16 +203,20 @@ func (f AccessControlDashboardPermissionFilter) Where() (string, []interface{})
|
||||
|
||||
func actionsToCheck(actions []string, permissions map[string][]string, wildcards ...accesscontrol.Wildcards) []interface{} {
|
||||
toCheck := make([]interface{}, 0, len(actions))
|
||||
|
||||
for _, a := range actions {
|
||||
var hasWildcard bool
|
||||
|
||||
outer:
|
||||
for _, scope := range permissions[a] {
|
||||
for _, w := range wildcards {
|
||||
if w.Contains(scope) {
|
||||
hasWildcard = true
|
||||
break
|
||||
break outer
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if !hasWildcard {
|
||||
toCheck = append(toCheck, a)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user