MCPcopy Create free account
hub / github.com/AI45Lab/Code / gen_permission_policy

Function gen_permission_policy

core/tests/test_persisted_schema_roundtrip.rs:478–491  ·  view source on GitHub ↗
(rng: &mut Rng)

Source from the content-addressed store, hash-verified

476}
477
478fn gen_permission_policy(rng: &mut Rng) -> PermissionPolicy {
479 PermissionPolicy {
480 deny: (0..rng.below(2))
481 .map(|_| gen_permission_rule(rng))
482 .collect(),
483 allow: (0..rng.below(3))
484 .map(|_| gen_permission_rule(rng))
485 .collect(),
486 ask: (0..rng.below(2))
487 .map(|_| gen_permission_rule(rng))
488 .collect(),
489 ..Default::default()
490 }
491}
492
493/// The largest persisted root type, and the carrier of the 3.3.0 identity
494/// fields (tenant/principal/template/correlation). Exercises a nested

Callers 1

gen_session_dataFunction · 0.85

Calls 2

gen_permission_ruleFunction · 0.85
belowMethod · 0.80

Tested by

no test coverage detected