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

Function test_identity

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

Source from the content-addressed store, hash-verified

335 use super::*;
336
337 fn test_identity() -> AuthenticatedIdentity {
338 use crate::control::security::identity::DatabaseSet;
339 AuthenticatedIdentity {
340 user_id: 42,
341 username: "alice".into(),
342 tenant_id: TenantId::new(1),
343 auth_method: AuthMethod::ScramSha256,
344 roles: vec![Role::ReadWrite],
345 is_superuser: false,
346 default_database: None,
347 accessible_databases: DatabaseSet::Some(smallvec::smallvec![
348 nodedb_types::id::DatabaseId::DEFAULT
349 ]),
350 }
351 }
352
353 #[test]
354 fn from_identity_populates_core_fields() {

Calls

no outgoing calls

Tested by

no test coverage detected