RBAC: Add function to reduce permissions (#58197)

* RBAC: Add function to reduce permissions

* Make names readable

Co-authored-by: Jguer <joao.guerreiro@grafana.com>

* Remove copy pasted comment

* Nit.

Co-authored-by: Jguer <joao.guerreiro@grafana.com>
Co-authored-by: Mihaly Gyongyosi <mgyongyosi@users.noreply.github.com>
This commit is contained in:
Gabriel MABILLE
2023-01-05 16:32:13 +00:00
committed by GitHub
co-authored by Jguer Mihaly Gyongyosi
parent a460d50781
commit 6da850a2f2
3 changed files with 171 additions and 0 deletions
+4
View File
@@ -170,3 +170,7 @@ func (wildcards Wildcards) Contains(scope string) bool {
}
return false
}
func isWildcard(scope string) bool {
return scope == "*" || strings.HasSuffix(scope, ":*")
}