Revoke all grants for a subject on an organization. Calls `DELETE /orgs/{slug}/grants/{subject_type}/{subject_id}`. The server removes **all** relations (read, write, admin, owner) for that subject in a single call. # Errors Returns [`TeamsError::OrgNotFound`](crate::error::TeamsError::OrgNotFound) if the org does not exist, or [`TeamsError::PermissionDenied`](crate::error::TeamsError::Permissi
(
client: &StorageClient,
org_slug: &str,
subject_type: GrantSubjectType,
subject_id: Uuid,
)
| 92 | /// [`TeamsError::PermissionDenied`](crate::error::TeamsError::PermissionDenied) |
| 93 | /// if the caller is not an org owner. |
| 94 | pub async fn revoke_org_grant( |
| 95 | client: &StorageClient, |
| 96 | org_slug: &str, |
| 97 | subject_type: GrantSubjectType, |
| 98 | subject_id: Uuid, |
| 99 | ) -> TeamsResult<()> { |
| 100 | let st = subject_type.to_string(); |
| 101 | let path = format!("/orgs/{org_slug}/grants/{st}/{subject_id}"); |
| 102 | client |
| 103 | .delete(&path) |
| 104 | .await |
| 105 | .map_err(|e| map_remote_error(e, format!("org {org_slug}"))) |
| 106 | } |
| 107 | |
| 108 | // --------------------------------------------------------------------------- |
| 109 | // Workspace grants |
nothing calls this directly
no test coverage detected