RBAC: Remove DeclareFixedRoles wrapper on Access control and inject service (#54153)

* RBAC: Remove DeclareFixedRoles wrapper on Access control and inject service when needed
This commit is contained in:
Karl Persson
2022-08-26 09:59:34 +02:00
committed by GitHub
parent c332bf885c
commit 5a1b9d2283
10 changed files with 33 additions and 43 deletions
@@ -18,10 +18,6 @@ type AccessControl interface {
// RegisterScopeAttributeResolver allows the caller to register a scope resolver for a
// specific scope prefix (ex: datasources:name:)
RegisterScopeAttributeResolver(prefix string, resolver ScopeAttributeResolver)
// DeclareFixedRoles allows the caller to declare, to the service, fixed roles and their
// assignments to organization roles ("Viewer", "Editor", "Admin") or "Grafana Admin"
// FIXME: Remove from access control interface and inject service where this is needed
DeclareFixedRoles(registrations ...RoleRegistration) error
//IsDisabled returns if access control is enabled or not
IsDisabled() bool
}