MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / auth_contains_check

Function auth_contains_check

nodedb/src/control/security/predicate.rs:260–271  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

258
259 #[test]
260 fn auth_contains_check() {
261 let pred = RlsPredicate::Contains {
262 set: PredicateValue::AuthRef("roles".into()),
263 element: PredicateValue::Literal(serde_json::json!("readwrite")),
264 };
265 let auth = make_auth();
266 let filters = substitute_to_scan_filters(&pred, &auth).unwrap();
267 assert_eq!(
268 filters[0].op,
269 crate::bridge::scan_filter::FilterOp::MatchAll
270 );
271 }
272
273 #[test]
274 fn field_contains_auth_ref() {

Callers

nothing calls this directly

Calls 2

make_authFunction · 0.70

Tested by

no test coverage detected