A granted-capability set.
More...
#include <reload_capabilities.hpp>
|
| static CapabilitySet | all () |
| static bool | parse (const std::vector< std::string > &names, CapabilitySet &out) |
| | Parse a declared-capability name list (from the signed manifest).
|
A granted-capability set.
Small fixed universe → a bitmask. Default = EMPTY (most restrictive), which is the consumer/protected-dev default; local-dev constructs all() (unenforced).
◆ CapabilitySet()
| pulp::view::CapabilitySet::CapabilitySet |
( |
| ) |
|
|
default |
◆ all()
◆ empty()
| bool pulp::view::CapabilitySet::empty |
( |
| ) |
const |
|
inline |
◆ first_effectful()
| std::optional< ReloadCapability > pulp::view::CapabilitySet::first_effectful |
( |
| ) |
const |
|
inlinenoexcept |
Return the first granted effectful capability in stable declaration order.
All current reload capabilities expose native side effects, so a live-realm evaluator must require this to be empty rather than trying to hide selected globals inside the same realm.
◆ grant()
◆ has()
◆ is_legacy_default()
| bool pulp::view::CapabilitySet::is_legacy_default |
( |
| ) |
const |
|
inlinenoexcept |
True only for a set produced by all(): the unenforced grant every trusted/local realm still receives by default.
A policy that must not fire until that default is replaced by an explicit grant keys on this, so an EXPLICIT grant of the same capabilities counts as a decision while the legacy default does not. Parsing a manifest or granting onto an empty set never yields a legacy-default set.
◆ parse()
| bool pulp::view::CapabilitySet::parse |
( |
const std::vector< std::string > & | names, |
|
|
CapabilitySet & | out ) |
|
inlinestatic |
Parse a declared-capability name list (from the signed manifest).
Returns false if any token is unknown (fail closed — reject the whole set).
The documentation for this class was generated from the following file: