Create a system identity for alert notification execution.
(tenant_id: TenantId, owner: &str)
| 240 | |
| 241 | /// Create a system identity for alert notification execution. |
| 242 | fn 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 | /// |
no test coverage detected