authorization

package
v0.1.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RoleOwner  = "Owner"
	RoleMember = "Member"
	RoleViewer = "Viewer"

	RelationViewer   Relation = "Viewer"
	RelationEditor   Relation = "Editor"
	RelationDeployer Relation = "Deployer"
	RelationManager  Relation = "Manager"
)

Variables

This section is empty.

Functions

func Allowed

func Allowed(context Context, permission Permission) bool

Types

type Context

type Context struct {
	InstallationAdministrator bool
	MembershipRole            string
	MembershipSuspended       bool
	Relations                 []Relation
}

type Permission

type Permission string
const (
	CreateWorkspace Permission = "installation.workspace.create"
	ManageUsers     Permission = "installation.users.manage"
	ManageAgents    Permission = "installation.agents.manage"
	ReadWorkspace   Permission = "workspace.read"
	ManageWorkspace Permission = "workspace.manage"
	ManageMembers   Permission = "workspace.members.manage"
	ManageGroups    Permission = "workspace.groups.manage"
	ReadAudit       Permission = "workspace.audit.read"
	EditResources   Permission = "resource.edit"
	Deploy          Permission = "app_environment.deploy"
)

type Relation

type Relation string

Jump to

Keyboard shortcuts

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