mirror of
https://github.com/grafana/grafana.git
synced 2024-11-27 03:11:01 -06:00
RBAC: add check for whether a role is managed (#55617)
* add check for whether a role is managed * fix typo
This commit is contained in:
parent
cf588bd083
commit
6f93630e97
@ -118,6 +118,10 @@ func (r *RoleDTO) Global() bool {
|
||||
return r.OrgID == GlobalOrgID
|
||||
}
|
||||
|
||||
func (r *RoleDTO) IsManaged() bool {
|
||||
return strings.HasPrefix(r.Name, ManagedRolePrefix)
|
||||
}
|
||||
|
||||
func (r *RoleDTO) IsFixed() bool {
|
||||
return strings.HasPrefix(r.Name, FixedRolePrefix)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user