permissions

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type PermissionSet

type PermissionSet struct {
	// contains filtered or unexported fields
}

func NewPermissionSet

func NewPermissionSet(perms []*v1.Multihost_Permission) (*PermissionSet, error)

func (*PermissionSet) CheckPermissionForPlan

func (p *PermissionSet) CheckPermissionForPlan(planID string, permType ...v1.Multihost_Permission_Type) bool

func (*PermissionSet) CheckPermissionForRepo

func (p *PermissionSet) CheckPermissionForRepo(repoID string, permType ...v1.Multihost_Permission_Type) bool

func (*PermissionSet) HasPermissionType added in v1.13.0

func (p *PermissionSet) HasPermissionType(permTypes ...v1.Multihost_Permission_Type) bool

HasPermissionType checks if any of the given permission types are granted, regardless of scopes. Use this for scope-less permissions like PERMISSION_RECEIVE_SHARED_REPOS.

type ScopeSet

type ScopeSet struct {
	// contains filtered or unexported fields
}

func NewScopeSet

func NewScopeSet(scopes []string) (*ScopeSet, error)

func (*ScopeSet) ContainsPlan

func (s *ScopeSet) ContainsPlan(planID string) bool

func (*ScopeSet) ContainsRepo

func (s *ScopeSet) ContainsRepo(repoID string) bool

func (*ScopeSet) Merge

func (s *ScopeSet) Merge(other *ScopeSet)

Jump to

Keyboard shortcuts

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