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

Method status

nodedb/src/control/security/scope/grant.rs:57–69  ·  view source on GitHub ↗

Check the time-bound status of this grant.

(&self)

Source from the content-addressed store, hash-verified

55impl ScopeGrant {
56 /// Check the time-bound status of this grant.
57 pub fn status(&self) -> ScopeStatus {
58 if self.expires_at == 0 {
59 return ScopeStatus::Active; // No expiry = permanent.
60 }
61 let now = now_secs();
62 if now < self.expires_at {
63 ScopeStatus::Active
64 } else if now < self.expires_at + self.grace_period_secs {
65 ScopeStatus::Grace
66 } else {
67 ScopeStatus::Expired
68 }
69 }
70
71 /// Check if this grant is still effective (active or in grace period).
72 pub fn is_effective(&self) -> bool {

Callers 15

flush_webhookMethod · 0.80
scope_statusMethod · 0.80
decrypt_with_vaultMethod · 0.80
rewrap_with_vaultMethod · 0.80
fetch_jwksFunction · 0.80
show_scope_grantsFunction · 0.80
status_forFunction · 0.80
query_ndjsonFunction · 0.80
spawn_metrics_exporterFunction · 0.80
deliver_eventFunction · 0.80

Calls 1

now_secsFunction · 0.70