ossaccesscontrol

package
v0.0.85-test Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 8, 2023 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DashboardViewActions = []string{accesscontrol.ActionDashboardsRead}

Functions

Types

type OSSAccessControlService

type OSSAccessControlService struct {
	// contains filtered or unexported fields
}

OSSAccessControlService is the service implementing role based access control.

func ProvideOSSAccessControl

func ProvideOSSAccessControl(features featuremgmt.FeatureToggles, provider accesscontrol.PermissionsProvider) *OSSAccessControlService

ProvideOSSAccessControl creates an oss implementation of access control without usage stats registration

func (*OSSAccessControlService) DeclareFixedRoles

func (ac *OSSAccessControlService) DeclareFixedRoles(registrations ...accesscontrol.RoleRegistration) error

DeclareFixedRoles allow the caller to declare, to the service, fixed roles and their assignments to organization roles ("Viewer", "Editor", "Admin") or "Grafana Admin"

func (*OSSAccessControlService) Evaluate

Evaluate evaluates access to the given resources

func (*OSSAccessControlService) GetUserBuiltInRoles

func (ac *OSSAccessControlService) GetUserBuiltInRoles(user *models.SignedInUser) []string

func (*OSSAccessControlService) GetUserPermissions

GetUserPermissions returns user permissions based on built-in roles

func (*OSSAccessControlService) GetUserRoles

GetUserRoles returns user permissions based on built-in roles

func (*OSSAccessControlService) IsDisabled

func (ac *OSSAccessControlService) IsDisabled() bool

func (*OSSAccessControlService) RegisterAttributeScopeResolver

func (ac *OSSAccessControlService) RegisterAttributeScopeResolver(scopePrefix string, resolver accesscontrol.AttributeScopeResolveFunc)

RegisterAttributeScopeResolver allows the caller to register scope resolvers for a specific scope prefix (ex: datasources:name:)

func (*OSSAccessControlService) RegisterFixedRoles

func (ac *OSSAccessControlService) RegisterFixedRoles() error

RegisterFixedRoles registers all declared roles in RAM

type PermissionsServices

type PermissionsServices struct {
	// contains filtered or unexported fields
}

func (*PermissionsServices) GetDashboardService

func (s *PermissionsServices) GetDashboardService() accesscontrol.PermissionsService

func (*PermissionsServices) GetDataSourceService

func (s *PermissionsServices) GetDataSourceService() accesscontrol.PermissionsService

func (*PermissionsServices) GetFolderService

func (*PermissionsServices) GetTeamService

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL