rbac

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: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RBAC

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

RBAC represents Role-based access control authorization policy.

func NewRBAC

func NewRBAC(userRoleRepo repository.UserRole) RBAC

NewRBAC create RBAC.

func (RBAC) HasPermission

func (a RBAC) HasPermission(user entity.User, permission permission.Permission) (bool, error)

HasPermission checks whether an user has a the given permission.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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