policy

package
v0.0.0-...-081ecb4 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2020 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoActiveSubscription = apierrors.NewNotAcceptableError("NOT_ACTIVE_SUBSCRIPTION")
View Source
var ErrNoProviderRepoOrAccess = errors.New("no provider repo or access to it")
View Source
var ErrNoSeatInSubscription = apierrors.NewNotAcceptableError("NOT_SEAT_IN_SUBSCRIPTION")
View Source
var ErrNotOrgAdmin = apierrors.NewNotAcceptableError("NOT_ORG_ADMIN")
View Source
var ErrNotOrgMember = apierrors.NewNotAcceptableError("NOT_ORG_MEMBER")

Functions

This section is empty.

Types

type ActiveSubscription

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

func NewActiveSubscription

func NewActiveSubscription(log logutil.Log, db *gorm.DB, cfg config.Config) *ActiveSubscription

func (ActiveSubscription) CheckForProviderPullRequestEvent

func (s ActiveSubscription) CheckForProviderPullRequestEvent(ctx context.Context, p provider.Provider, ev *provider.PullRequestEvent) error

func (ActiveSubscription) CheckForProviderRepo

func (s ActiveSubscription) CheckForProviderRepo(p provider.Provider, pr *provider.Repo) error

type Organization

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

func NewOrganization

func NewOrganization(pf providers.Factory, cache cache.Cache, cfg config.Config, log logutil.Log) *Organization

func (Organization) CheckCanModify

func (op Organization) CheckCanModify(rc *request.AuthorizedContext, org *models.Org) error

type Repo

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

func NewRepo

func NewRepo(pf providers.Factory, cfg config.Config, log logutil.Log, cache cache.Cache, authorizer *auth.Authorizer) *Repo

func (Repo) CanRead

func (r Repo) CanRead(ctx context.Context, repo models.UniversalRepo, auth *models.Auth) error

func (Repo) CanReadPrivateRepo

func (r Repo) CanReadPrivateRepo(rc *request.AnonymousContext, repo models.UniversalRepo) error

Jump to

Keyboard shortcuts

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