This reverts commit 55efeb0c02.
This commit is contained in:
@@ -4,6 +4,13 @@ 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"`
|
||||
@@ -42,9 +49,6 @@ func (p RoleDTO) Role() Role {
|
||||
const (
|
||||
// Permission actions
|
||||
|
||||
// Provisioning actions
|
||||
ActionProvisioningReload = "provisioning:reload"
|
||||
|
||||
// Users actions
|
||||
ActionUsersRead = "users:read"
|
||||
ActionUsersWrite = "users:write"
|
||||
@@ -94,15 +98,13 @@ const (
|
||||
// Global Scopes
|
||||
ScopeGlobalUsersAll = "global:users:*"
|
||||
|
||||
// Users scopes
|
||||
ScopeUsersSelf = "users:self"
|
||||
ScopeUsersAll = "users:*"
|
||||
// Users scope
|
||||
ScopeUsersAll = "users:*"
|
||||
|
||||
// Settings scope
|
||||
ScopeSettingsAll = "settings:**"
|
||||
|
||||
// Services Scopes
|
||||
ScopeServicesAll = "service:*"
|
||||
)
|
||||
|
||||
const RoleGrafanaAdmin = "Grafana Admin"
|
||||
|
||||
const FixedRolePrefix = "fixed:"
|
||||
|
||||
Reference in New Issue
Block a user