ossaccesscontrol

package
v11.1.4-modfix Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: AGPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DashboardViewActions = []string{dashboards.ActionDashboardsRead}
View Source
var DatasourceQueryActions = []string{
	datasources.ActionRead,
	datasources.ActionQuery,
}

DatasourceQueryActions contains permissions to read information about a data source and submit arbitrary queries to it.

Functions

This section is empty.

Types

type DashboardPermissionsService

type DashboardPermissionsService struct {
	*resourcepermissions.Service
}

func ProvideDashboardPermissions

func ProvideDashboardPermissions(
	cfg *setting.Cfg, features featuremgmt.FeatureToggles, router routing.RouteRegister, sql db.DB, ac accesscontrol.AccessControl,
	license licensing.Licensing, dashboardStore dashboards.Store, folderService folder.Service, service accesscontrol.Service,
	teamService team.Service, userService user.Service, actionSetService resourcepermissions.ActionSetService,
) (*DashboardPermissionsService, error)

type DatasourcePermissionsService

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

func ProvideDatasourcePermissionsService

func ProvideDatasourcePermissionsService(cfg *setting.Cfg, features featuremgmt.FeatureToggles, db db.DB) *DatasourcePermissionsService

func (DatasourcePermissionsService) DeleteResourcePermissions

func (e DatasourcePermissionsService) DeleteResourcePermissions(ctx context.Context, orgID int64, resourceID string) error

func (DatasourcePermissionsService) GetPermissions

func (DatasourcePermissionsService) MapActions

func (DatasourcePermissionsService) SetBuiltInRolePermission

func (e DatasourcePermissionsService) SetBuiltInRolePermission(ctx context.Context, orgID int64, builtInRole string, resourceID string, permission string) (*accesscontrol.ResourcePermission, error)

func (DatasourcePermissionsService) SetPermissions

SetPermissions sets managed permissions for a datasource in OSS. This ensures that Viewers and Editors maintain query access to a data source if an OSS/unlicensed instance is upgraded to Enterprise/licensed. https://github.com/grafana/identity-access-team/issues/672

func (DatasourcePermissionsService) SetTeamPermission

func (e DatasourcePermissionsService) SetTeamPermission(ctx context.Context, orgID, teamID int64, resourceID, permission string) (*accesscontrol.ResourcePermission, error)

func (DatasourcePermissionsService) SetUserPermission

func (e DatasourcePermissionsService) SetUserPermission(ctx context.Context, orgID int64, user accesscontrol.User, resourceID, permission string) (*accesscontrol.ResourcePermission, error)

type FolderPermissionsService

type FolderPermissionsService struct {
	*resourcepermissions.Service
}

func ProvideFolderPermissions

func ProvideFolderPermissions(
	cfg *setting.Cfg, features featuremgmt.FeatureToggles, router routing.RouteRegister, sql db.DB, accesscontrol accesscontrol.AccessControl,
	license licensing.Licensing, dashboardStore dashboards.Store, folderService folder.Service, service accesscontrol.Service,
	teamService team.Service, userService user.Service, actionSetService resourcepermissions.ActionSetService,
) (*FolderPermissionsService, error)

type ServiceAccountPermissionsService

type ServiceAccountPermissionsService struct {
	*resourcepermissions.Service
}

func ProvideServiceAccountPermissions

func ProvideServiceAccountPermissions(
	cfg *setting.Cfg, features featuremgmt.FeatureToggles, router routing.RouteRegister, sql db.DB, ac accesscontrol.AccessControl,
	license licensing.Licensing, serviceAccountRetrieverService *retriever.Service, service accesscontrol.Service,
	teamService team.Service, userService user.Service, actionSetService resourcepermissions.ActionSetService,
) (*ServiceAccountPermissionsService, error)

type TeamPermissionsService

type TeamPermissionsService struct {
	*resourcepermissions.Service
}

func ProvideTeamPermissions

func ProvideTeamPermissions(
	cfg *setting.Cfg, features featuremgmt.FeatureToggles, router routing.RouteRegister, sql db.DB,
	ac accesscontrol.AccessControl, license licensing.Licensing, service accesscontrol.Service,
	teamService team.Service, userService user.Service, actionSetService resourcepermissions.ActionSetService,
) (*TeamPermissionsService, error)

Jump to

Keyboard shortcuts

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