oper

package
v0.0.0-...-df918ef Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2022 License: ISC Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	Opers []Oper
}

Handler is a PermissionHandler that checks for opers and oper names

func (*Handler) IsAuthorised

func (h *Handler) IsAuthorised(u *user.EphemeralUser, requiredPermissions []string) (bool, error)

IsAuthorised implements Handler.IsAuthorized. It checks against the users oper name and nothing else. Configured oper names are globbed.

type Oper

type Oper struct {
	Name        string
	Permissions []string
}

Oper represents an oper name, and a permission level

Jump to

Keyboard shortcuts

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