mirror of
https://github.com/grafana/grafana.git
synced 2025-02-11 16:15:42 -06:00
Auth: reduce allocs (#55410)
This commit is contained in:
parent
10b3c0787a
commit
13146cc812
@ -173,8 +173,8 @@ func BuildPermissionsMap(permissions []Permission) map[string]bool {
|
||||
// GroupScopesByAction will group scopes on action
|
||||
func GroupScopesByAction(permissions []Permission) map[string][]string {
|
||||
m := make(map[string][]string)
|
||||
for _, p := range permissions {
|
||||
m[p.Action] = append(m[p.Action], p.Scope)
|
||||
for i := range permissions {
|
||||
m[permissions[i].Action] = append(m[permissions[i].Action], permissions[i].Scope)
|
||||
}
|
||||
return m
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user