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

Function allows_write_by_status

nodedb/src/control/security/auth_context.rs:448–457  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

446
447 #[test]
448 fn allows_write_by_status() {
449 let mut ctx = AuthContext::from_identity(&test_identity(), "s_test_008".into());
450 assert!(ctx.allows_write()); // Active
451
452 ctx.status = AuthStatus::ReadOnly;
453 assert!(!ctx.allows_write());
454
455 ctx.status = AuthStatus::Restricted;
456 assert!(ctx.allows_write());
457 }
458
459 #[test]
460 fn auth_status_display_roundtrip() {

Callers

nothing calls this directly

Calls 1

test_identityFunction · 0.70

Tested by

no test coverage detected