rbac

package
v0.45.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GlobalProject = "*"
)

Variables

This section is empty.

Functions

func NewCronTask

func NewCronTask(rbacService RBAC, persesDAO model.DAO) async.SimpleTask

Types

type RBAC

type RBAC interface {
	IsEnabled() bool
	// GetUserProjects return the list of the project the user has access to in the context of the role and the scope requested.
	GetUserProjects(user string, requestAction v1Role.Action, requestScope v1Role.Scope) []string
	HasPermission(user string, requestAction v1Role.Action, requestProject string, requestScope v1Role.Scope) bool
	GetPermissions(user string) map[string][]*v1Role.Permission
	Refresh() error
}

func New

func New(userDAO user.DAO, roleDAO role.DAO, roleBindingDAO rolebinding.DAO, globalRoleDAO globalrole.DAO, globalRoleBindingDAO globalrolebinding.DAO, conf config.Config) (RBAC, error)

Jump to

Keyboard shortcuts

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