job

package
v0.0.0-...-3511abf Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

AuthZProvider is the authz registry for Notebooks, Shells, and Commands.

Functions

This section is empty.

Types

type JobAuthZ

type JobAuthZ interface {
	// FilterJobs returns a list of jobs that the user is authorized to view.
	FilterJobs(
		ctx context.Context, curUser model.User, jobs []*jobv1.Job,
	) ([]*jobv1.Job, error)

	// CanControlJobQueue returns an error if the user is not authorized to manipulate the
	// job queue.
	CanControlJobQueue(
		ctx context.Context, curUser *model.User,
	) (permErr error, err error)
}

JobAuthZ describes authz methods for jobs.

type JobAuthZBasic

type JobAuthZBasic struct{}

JobAuthZBasic is basic OSS controls.

func (*JobAuthZBasic) CanControlJobQueue

func (a *JobAuthZBasic) CanControlJobQueue(
	ctx context.Context, curUser *model.User,
) (permErr error, err error)

CanControlJobQueue returns an error if the user is not authorized to manipulate the job queue.

func (*JobAuthZBasic) FilterJobs

func (a *JobAuthZBasic) FilterJobs(
	ctx context.Context, curUser model.User, jobs []*jobv1.Job,
) ([]*jobv1.Job, error)

FilterJobs returns a list of jobs that the user can view.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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