rbac

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RoleSuperAdmin  = "super_admin"
	RoleTenantAdmin = "tenant_admin"
	RoleManager     = "manager"
	RoleSupport     = "support"
	RoleViewer      = "viewer"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Authorizer

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

func NewDefaultAuthorizer

func NewDefaultAuthorizer() *Authorizer

func (*Authorizer) Can

func (a *Authorizer) Can(actor admin.Actor, permission string) bool

type Role

type Role struct {
	Name        string   `json:"name"`
	Description string   `json:"description"`
	Permissions []string `json:"permissions"`
}

func DefaultRoles

func DefaultRoles() []Role

Jump to

Keyboard shortcuts

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