Revert "AccessControl: Implement a way to register fixed roles (#35641)" (#37397)

This reverts commit 88c11f1cc0.
This commit is contained in:
Emil Tullstedt
2021-07-30 13:58:49 +02:00
committed by GitHub
parent 9494c2cd4f
commit 55efeb0c02
14 changed files with 237 additions and 959 deletions
+9 -11
View File
@@ -4,13 +4,6 @@ import (
"time"
)
// RoleRegistration stores a role and its assignments to built-in roles
// (Viewer, Editor, Admin, Grafana Admin)
type RoleRegistration struct {
Role RoleDTO
Grants []string
}
type Role struct {
Version int64 `json:"version"`
UID string `json:"uid"`
@@ -49,6 +42,9 @@ func (p RoleDTO) Role() Role {
const (
// Permission actions
// Provisioning actions
ActionProvisioningReload = "provisioning:reload"
// Users actions
ActionUsersRead = "users:read"
ActionUsersWrite = "users:write"
@@ -95,13 +91,15 @@ const (
// Global Scopes
ScopeGlobalUsersAll = "global:users:*"
// Users scope
ScopeUsersAll = "users:*"
// Users scopes
ScopeUsersSelf = "users:self"
ScopeUsersAll = "users:*"
// Settings scope
ScopeSettingsAll = "settings:**"
// Services Scopes
ScopeServicesAll = "service:*"
)
const RoleGrafanaAdmin = "Grafana Admin"
const FixedRolePrefix = "fixed:"