role

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package role names the roles a Gophenberg account holds and the capabilities they carry.

Index

Constants

View Source
const Admin = "admin"

Admin is the role holding every authority over the site.

View Source
const Author = "author"

Author is the role working only its own content and media.

View Source
const Editor = "editor"

Editor is the role working every account's content and media.

View Source
const Member = "member"

Member is the role of a signed-in account that never enters the admin.

View Source
const Source = "core"

Source is the source the core grants its roles under in a registry.

Variables

This section is empty.

Functions

func Core added in v0.19.0

func Core() []goncierge.Role

Core returns the core's roles with the capabilities each carries, for a registry to grant.

func MayChange

func MayChange(capabilities []string, actor, author uuid.UUID) bool

MayChange reports whether an account carrying the capabilities may change work the author owns.

func Registry added in v0.19.0

func Registry() *goncierge.Registry

Registry returns a registry holding the core's roles alone.

Types

type Capability

type Capability string

Capability is a named permission a decision point asks for.

const AccessAdmin Capability = "access_admin"

AccessAdmin is the capability entering the admin and working its content and media.

const ChangeOthersWork Capability = "change_others_work"

ChangeOthersWork is the capability changing content and media another account wrote.

const ManageSettings Capability = "manage_settings"

ManageSettings is the capability writing the site wide settings.

const ManageThemes Capability = "manage_themes"

ManageThemes is the capability installing and switching themes.

const ManageTypes Capability = "manage_types"

ManageTypes is the capability reshaping the content model.

const ManageUsers Capability = "manage_users"

ManageUsers is the capability administering accounts.

Jump to

Keyboard shortcuts

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