MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / require

Method require

libatomic/src/daemon/sandbox_grants.rs:496–504  ·  view source on GitHub ↗

Refuse unless the grant carries `capability`.

(&self, capability: &str)

Source from the content-addressed store, hash-verified

494
495 /// Refuse unless the grant carries `capability`.
496 pub fn require(&self, capability: &str) -> Result<(), Status> {
497 if self.grant.allows(capability) {
498 return Ok(());
499 }
500 Err(domain_status(
501 ErrorCode::Forbidden,
502 format!("this sandbox's grant does not include {capability}"),
503 ))
504 }
505
506 /// Refuse unless the request is for the grant's repository (and names no
507 /// host workspace) and `named` — the view the request names, if any — is

Callers 10

data_viewFunction · 0.45
submit_changeMethod · 0.45
reserve_turn_implFunction · 0.45
append_envelopes_implFunction · 0.45
prepare_checkpoint_implFunction · 0.45
update_turn_implFunction · 0.45
get_turn_implFunction · 0.45

Calls 2

domain_statusFunction · 0.85
allowsMethod · 0.45

Tested by

no test coverage detected