role

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Role

type Role string
const (
	Photographer        Role = "Photographer"
	Manager             Role = "Manager"
	ProgrammeEditor     Role = "Programme Editor"
	LeagueSecretary     Role = "League Secretary"
	Treasurer           Role = "Treasurer"
	SafeguardingOfficer Role = "Safeguarding Officer"
	ClubSecretary       Role = "Club Secretary"
	Chairperson         Role = "Chairperson"
	Webmaster           Role = "Webmaster"
)

func GetRole

func GetRole(role string) (Role, error)

func (Role) CanEdit

func (r Role) CanEdit() bool

CanEdit reports whether the role may manage site content (everyone except Managers and Photographers), matching RequireNotManagerNotPhotographer.

func (Role) CanManageGallery

func (r Role) CanManageGallery() bool

CanManageGallery reports whether the role may add or remove gallery images, matching RequireNotManager.

func (Role) CanManagePlayers

func (r Role) CanManagePlayers() bool

CanManagePlayers reports whether the role may add, edit and remove players and see their dates of birth: editors other than Programme Editors, who get a cut-down players list instead.

func (Role) DBString

func (r Role) DBString() string

func (Role) IsClubSecretaryHigher

func (r Role) IsClubSecretaryHigher() bool

IsClubSecretaryHigher matches RequireClubSecretaryHigher.

func (Role) String

func (r Role) String() string

Jump to

Keyboard shortcuts

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