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:
Ieva
2022-09-22 15:00:42 +01:00
committed by GitHub
parent cf588bd083
commit 6f93630e97

View File

@@ -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)
}