Skip to main content

uqa_sql/ast/
object_acl.rs

1//
2// Unified Query Algebra
3//
4// Copyright (c) 2023-2026 Cognica, Inc.
5//
6
7//! One ACL entry of an object with a single grantable privilege, such as a routine's `EXECUTE` or a type's `USAGE`.
8
9use serde::{Deserialize, Serialize};
10
11/// One explicit ACL entry. An absent ACL keeps the object's `PostgreSQL` default: the privilege for PUBLIC and the owner.
12#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
13pub struct ObjectAclEntry {
14    /// An explicit null means PUBLIC; a missing grantee is invalid.
15    #[serde(deserialize_with = "Deserialize::deserialize")]
16    pub role: Option<uqa_core::catalog_role::RoleIdentity>,
17    pub grantor: uqa_core::catalog_role::RoleIdentity,
18    pub grant_option: bool,
19}