# Functions
CheckScopesGlobals checks if the global or service global scope exists in the list of scope strings.
ListGranted returns true if any or all scopes listed are granted by the provided "have" scope.
ListGrants returns true if any of the listed scopes grant the provided "want" scope.
NewCasbinAuthorization returns a new Casbin enforcer.
NewCasbinScopeAuthorization returns a new casbin enforcer.
NewCasbinStringAuthorization returns a new Casbin enforcer with the string model.
ResourceAccessForScopes checks which resources a list of scopes grant access to
Inputs: scopes ([]Scope): list of scopes that have been granted minAllAccessScope (Scope): minimum access scope that grants access to all requested resources requestedResources: ([]string): list of data keys for which scope access should be checked Outputs: allAccess (bool): whether any scope in scopes grants access to all requested resources accessKeys ([]string): all data keys the provided scopes grant access to in minAllAccessScope context err (error): returned if scopes do not grant access to all requested resources.
ScopeFromString creates a scope object from the string representation.
ScopeServiceGlobal returns the global scope.
ScopesFromStrings creates a list of scope objects from a list of string representations.
ScopesToStrings creates a list of string representations from a list of scope objects.
# Constants
ScopeAll represents all options of a scope component.
ScopeGlobal represents the global scope.
ScopeOperationCreate indicates a scope may be used for a create operation.
ScopeOperationDelete indicates a scope may be used for a delete operation.
ScopeOperationGet indicates a scope may be used for a get operation.
ScopeOperationUpdate indicates a scope may be used for a update operation.
# Structs
CasbinAuthorization is a Casbin implementation of the authorization interface.
CasbinScopeAuthorization is a Casbin implementation of the authorization interface for scope values.
Scope represents a scope entity.
# Interfaces
Authorization is a standard authorization interface that can be reused by various auth types.