job

package
v0.38.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: Apache-2.0 Imports: 11 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.

type JobAuthZPermissive

type JobAuthZPermissive struct{}

JobAuthZPermissive is permissive OSS controls.

func (*JobAuthZPermissive) CanControlJobQueue

func (a *JobAuthZPermissive) 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 (*JobAuthZPermissive) FilterJobs

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

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

type JobAuthZRBAC

type JobAuthZRBAC struct{}

JobAuthZRBAC is basic OSS controls.

func (*JobAuthZRBAC) CanControlJobQueue

func (a *JobAuthZRBAC) 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 (*JobAuthZRBAC) FilterJobs

func (a *JobAuthZRBAC) FilterJobs(
	ctx context.Context, curUser model.User, jobs []*jobv1.Job,
) (viewableJobs []*jobv1.Job, err 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