authorizer

package
v0.0.0-...-57b459a Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authorizer

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

Authorizer checks whether an user is granted required permissions in order to perform certain operations.

func NewAuthorizer

func NewAuthorizer(rbac rbac.RBAC) Authorizer

NewAuthorizer creates a new Authorizer object

func (Authorizer) CanCreateChange

func (a Authorizer) CanCreateChange(user entity.User) (bool, error)

CanCreateChange decides whether a user is allowed to create a change.

func (Authorizer) CanDeleteChange

func (a Authorizer) CanDeleteChange(user entity.User) (bool, error)

CanDeleteChange decides whether a user is allowed to delete a change.

func (Authorizer) CanGenerateAPIKey

func (a Authorizer) CanGenerateAPIKey(user entity.User) (bool, error)

CanGenerateAPIKey decides whether a user is allowed to generate a new api key.

func (Authorizer) CanGetChanges

func (a Authorizer) CanGetChanges(user entity.User) (bool, error)

CanGetChanges decides whether a user is allowed to get changes.

func (Authorizer) CanUpdateChange

func (a Authorizer) CanUpdateChange(user entity.User) (bool, error)

CanUpdateChange decides whether a user is allowed to update a change.

func (Authorizer) CanViewAdminPanel

func (a Authorizer) CanViewAdminPanel(user entity.User) (bool, error)

CanViewAdminPanel decides whether a user is allowed to view admin panel.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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