(
expr_is_const: bool,
target_cluster_id: Option<ClusterId>,
role_id: RoleId,
)
| 1805 | } |
| 1806 | |
| 1807 | fn generate_cluster_usage_privileges( |
| 1808 | expr_is_const: bool, |
| 1809 | target_cluster_id: Option<ClusterId>, |
| 1810 | role_id: RoleId, |
| 1811 | ) -> Option<(SystemObjectId, AclMode, RoleId)> { |
| 1812 | // TODO(jkosh44) expr hasn't been fully optimized yet, so it might actually be a constant, |
| 1813 | // but we mistakenly think that it's not. For now it's ok to be overly protective. |
| 1814 | if !expr_is_const { |
| 1815 | if let Some(cluster_id) = target_cluster_id { |
| 1816 | return Some(( |
| 1817 | SystemObjectId::Object(cluster_id.into()), |
| 1818 | AclMode::USAGE, |
| 1819 | role_id, |
| 1820 | )); |
| 1821 | } |
| 1822 | } |
| 1823 | |
| 1824 | None |
| 1825 | } |
| 1826 | |
| 1827 | fn check_object_privileges( |
| 1828 | catalog: &impl SessionCatalog, |
no test coverage detected