Reports whether any role has ownership over an object.
(
object_id: &ObjectId,
role_ids: &BTreeSet<RoleId>,
catalog: &impl SessionCatalog,
)
| 1636 | |
| 1637 | /// Reports whether any role has ownership over an object. |
| 1638 | fn check_owner_roles( |
| 1639 | object_id: &ObjectId, |
| 1640 | role_ids: &BTreeSet<RoleId>, |
| 1641 | catalog: &impl SessionCatalog, |
| 1642 | ) -> bool { |
| 1643 | if let Some(owner_id) = catalog.get_owner_id(object_id) { |
| 1644 | role_ids.contains(&owner_id) |
| 1645 | } else { |
| 1646 | true |
| 1647 | } |
| 1648 | } |
| 1649 | |
| 1650 | fn ownership_err( |
| 1651 | unheld_ownership: Vec<ObjectId>, |
no test coverage detected