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

Function validate_auth_refs_passes

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

Source from the content-addressed store, hash-verified

417
418 #[test]
419 fn validate_auth_refs_passes() {
420 let pred = parse_predicate("user_id = $auth.id AND $auth.roles CONTAINS 'admin'").unwrap();
421 assert!(validate_auth_refs(&pred).is_ok());
422 }
423
424 #[test]
425 fn validate_auth_refs_rejects_unknown() {

Callers

nothing calls this directly

Calls 1

parse_predicateFunction · 0.85

Tested by

no test coverage detected