mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
RBAC: GrafanaAdmin users are admins of the Global Organization (#78559)
This commit is contained in:
parent
5355131aed
commit
91a5c3803c
@ -365,6 +365,10 @@ func GetOrgRoles(user identity.Requester) []string {
|
||||
roles := []string{string(user.GetOrgRole())}
|
||||
|
||||
if user.GetIsGrafanaAdmin() {
|
||||
if user.GetOrgID() == GlobalOrgID {
|
||||
// A server admin is the admin of the global organization
|
||||
return []string{RoleGrafanaAdmin, string(org.RoleAdmin)}
|
||||
}
|
||||
roles = append(roles, RoleGrafanaAdmin)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user