role

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: May 29, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnauthenticated  = status.Error(codes.Unauthenticated, "Unauthenticated user")
	ErrPermissionDenied = status.Error(codes.PermissionDenied, "Permission denied")
	ErrInternal         = status.Error(codes.Internal, "Internal")
)

Functions

func CheckEnvironmentRole added in v0.4.0

func CheckEnvironmentRole(
	ctx context.Context,
	requiredRole accountproto.AccountV2_Role_Environment,
	environmentID string,
	getAccountFunc func(email string) (*accountproto.AccountV2, error),
) (*eventproto.Editor, error)

func CheckOrganizationRole added in v0.4.0

func CheckOrganizationRole(
	ctx context.Context,
	requiredRole accountproto.AccountV2_Role_Organization,
	getAccountFunc func(email string) (*accountproto.GetAccountV2Response, error),
) (*eventproto.Editor, error)

func CheckSystemAdminRole added in v0.4.0

func CheckSystemAdminRole(ctx context.Context) (*eventproto.Editor, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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