Documentation
¶
Overview ¶
Package permission models explicit, scoped access grants independently from the approval UI and the operating-system sandbox implementation.
Index ¶
- func Empty(profile Profile) bool
- type FileSystem
- type Manager
- func (m *Manager) AllowsNetwork(protocol, domain string) bool
- func (m *Manager) AllowsURL(raw string) bool
- func (m *Manager) AllowsUnrestrictedNetwork() bool
- func (m *Manager) BeginTurn()
- func (m *Manager) Grant(profile Profile, scope Scope) (Profile, error)
- func (m *Manager) ReadRoots() []string
- func (m *Manager) Snapshot() Snapshot
- func (m *Manager) WriteRoots() []string
- type Network
- type Profile
- type Request
- type Scope
- type Snapshot
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FileSystem ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func (*Manager) AllowsNetwork ¶
func (*Manager) AllowsUnrestrictedNetwork ¶
AllowsUnrestrictedNetwork is deliberately strict. The shell sandbox is only opened when both protocol and domain were explicitly granted as wildcards; domain-specific grants remain enforceable only by URL-aware tools.
func (*Manager) BeginTurn ¶
func (m *Manager) BeginTurn()
BeginTurn expires all access that was approved for only the previous user turn. Session grants remain active until the process exits.
func (*Manager) WriteRoots ¶
type Profile ¶
type Profile struct {
FileSystem FileSystem `json:"file_system,omitempty" yaml:"file_system,omitempty"`
Network Network `json:"network,omitempty" yaml:"network,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.