Access Control: Refactor scope resolvers with support to resolve into several scopes (#48202)
* Refactor Scope resolver to support resolving into several scopes * Change permission evaluator to match at least one of passed scopes
This commit is contained in:
@@ -32,9 +32,9 @@ type AccessControl interface {
|
||||
// assignments to organization roles ("Viewer", "Editor", "Admin") or "Grafana Admin"
|
||||
DeclareFixedRoles(...RoleRegistration) error
|
||||
|
||||
// RegisterAttributeScopeResolver allows the caller to register a scope resolver for a
|
||||
// RegisterScopeAttributeResolver allows the caller to register a scope resolver for a
|
||||
// specific scope prefix (ex: datasources:name:)
|
||||
RegisterAttributeScopeResolver(scopePrefix string, resolver AttributeScopeResolveFunc)
|
||||
RegisterScopeAttributeResolver(scopePrefix string, resolver ScopeAttributeResolver)
|
||||
}
|
||||
|
||||
type PermissionsProvider interface {
|
||||
|
||||
Reference in New Issue
Block a user