mirror of
https://github.com/grafana/grafana.git
synced 2026-08-16 16:14:59 -05:00
AccessControl: Modify provisioning to prevent built-in role assignment (#48031)
* Add basic and managed prefixes to avoid magic strings For now let's stick with grafana_builtins add function isBasic to RoleDTO add function isBasic to Role Co-authored-by: Jguer <joao.guerreiro@grafana.com> * Add team store to wire Co-authored-by: Jguer <joao.guerreiro@grafana.com> Co-authored-by: Jguer <joao.guerreiro@grafana.com>
This commit is contained in:
@@ -32,7 +32,7 @@ type flatResourcePermission struct {
|
||||
}
|
||||
|
||||
func (p *flatResourcePermission) IsManaged() bool {
|
||||
return strings.HasPrefix(p.RoleName, "managed:") && !p.IsInherited()
|
||||
return strings.HasPrefix(p.RoleName, accesscontrol.ManagedRolePrefix) && !p.IsInherited()
|
||||
}
|
||||
|
||||
func (p *flatResourcePermission) IsInherited() bool {
|
||||
|
||||
Reference in New Issue
Block a user