authz

package
v0.0.0-...-9b598c7 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAuthZService

func NewAuthZService(
	clusterService services.ConnectorClusterService,
	namespaceService services.ConnectorNamespaceService,
	connectorService services.ConnectorsService,
) *authZService

Types

type AuthZService

type AuthZService interface {
	GetValidationUser(ctx context.Context) *ValidationUser
	GetUser(ctx context.Context) (*User, *errors.ServiceError)
}

type User

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

func (*User) IsAdmin

func (u *User) IsAdmin() bool

func (*User) IsOrgAdmin

func (u *User) IsOrgAdmin() bool

func (*User) OrgId

func (u *User) OrgId() string

func (*User) UserId

func (u *User) UserId() string

type ValidationUser

type ValidationUser struct {
	User
	// contains filtered or unexported fields
}

func (*ValidationUser) AuthorizedClusterAdmin

func (u *ValidationUser) AuthorizedClusterAdmin() handlers.ValidateOption

func (*ValidationUser) AuthorizedClusterUser

func (u *ValidationUser) AuthorizedClusterUser() handlers.ValidateOption

func (*ValidationUser) AuthorizedCreateEvalNamespace

func (u *ValidationUser) AuthorizedCreateEvalNamespace() handlers.Validate

func (*ValidationUser) AuthorizedNamespaceAdmin

func (u *ValidationUser) AuthorizedNamespaceAdmin() handlers.ValidateOption

func (*ValidationUser) AuthorizedNamespaceUser

func (u *ValidationUser) AuthorizedNamespaceUser(errorCode errors.ServiceErrorCode) handlers.ValidateOption

func (*ValidationUser) AuthorizedOrgAdmin

func (u *ValidationUser) AuthorizedOrgAdmin() handlers.Validate

func (*ValidationUser) ValidateNamespaceConnectorQuota

func (u *ValidationUser) ValidateNamespaceConnectorQuota() handlers.ValidateOption

Jump to

Keyboard shortcuts

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