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

Function alert_identity

nodedb/src/event/alert/notify.rs:242–253  ·  view source on GitHub ↗

Create a system identity for alert notification execution.

(tenant_id: TenantId, owner: &str)

Source from the content-addressed store, hash-verified

240
241/// Create a system identity for alert notification execution.
242fn alert_identity(tenant_id: TenantId, owner: &str) -> AuthenticatedIdentity {
243 AuthenticatedIdentity {
244 user_id: 0,
245 username: owner.to_string(),
246 tenant_id,
247 auth_method: AuthMethod::Trust,
248 roles: vec![Role::Superuser],
249 is_superuser: true,
250 default_database: None,
251 accessible_databases: crate::control::security::identity::DatabaseSet::All,
252 }
253}
254
255/// SQL string escaping for single-quoted literals.
256///

Callers 1

notify_insertFunction · 0.85

Calls 1

to_stringMethod · 0.80

Tested by

no test coverage detected