acl

package
v0.0.0-...-c4d1a2a Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2024 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsAllowedExec

func IsAllowedExec(cfg *config.Config, user *AuthenticatedUser, action *config.Action) bool

IsAllowedExec checks if a AuthenticatedUser is allowed to execute an Action

func IsAllowedView

func IsAllowedView(cfg *config.Config, user *AuthenticatedUser, action *config.Action) bool

IsAllowedView checks if a User is allowed to view an Action

Types

type AuthenticatedUser

type AuthenticatedUser struct {
	Username  string
	Usergroup string
	// contains filtered or unexported fields
}

User respresents a person.

func UserFromContext

func UserFromContext(ctx context.Context, cfg *config.Config) *AuthenticatedUser

UserFromContext tries to find a user from a grpc context

Jump to

Keyboard shortcuts

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