role

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 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 CheckAdminRole

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

func CheckRole

func CheckRole(
	ctx context.Context,
	requiredRole accountproto.Account_Role,
	getAccountFunc func(email string) (*accountproto.GetAccountResponse, error),
) (*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