authorization

package
v0.1.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 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 Capabilities

type Capabilities struct {
	ReadWorkspace    bool
	ManageWorkspace  bool
	ManageMembers    bool
	ManageGroups     bool
	ReadAudit        bool
	ManageAutomation bool
	EditResources    bool
	Deploy           bool
}

func EffectiveCapabilities

func EffectiveCapabilities(context Context) Capabilities

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"
	ManageBindings   Permission = "installation.bindings.manage"
	ReadWorkspace    Permission = "workspace.read"
	ManageWorkspace  Permission = "workspace.manage"
	ManageMembers    Permission = "workspace.members.manage"
	ManageGroups     Permission = "workspace.groups.manage"
	ReadAudit        Permission = "workspace.audit.read"
	ManageAutomation Permission = "workspace.automation.manage"
	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