role

package
v3.0.0-alpha9 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2019 License: OSL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider interface {
	All(context.Context, *web.Session) []domain.Role
}

Provider interface

type Service

type Service interface {
	AllPermissions(context.Context, *web.Session) []string
}

Service implements behaviour for retrieving permissions by using all role providers

type ServiceImpl

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

The ServiceImpl is the default Service implementation

func (*ServiceImpl) AllPermissions

func (s *ServiceImpl) AllPermissions(ctx context.Context, session *web.Session) []string

AllPermissions returns all available permissions, based on their hierarchy

func (*ServiceImpl) Inject

func (s *ServiceImpl) Inject(p []Provider, cfg *struct {
	PermissionHierarchy config.Map `inject:"config:security.roles.permissionHierarchy"`
})

Inject dependencies

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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