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`] if the org does not exist, or [`TeamsError::PermissionDenied`] if the caller is not an org owner. Returns [`TeamsError::InvalidInput`] w
(
client: &StorageClient,
org_slug: &str,
subject_type: GrantSubjectType,
subject_id: Uuid,
)
| 110 | /// [`TeamsError::InvalidInput`] when |
| 111 | /// `subject_type` is [`GrantSubjectType::Everyone`]. |
| 112 | pub async fn revoke_org_grant( |
| 113 | client: &StorageClient, |
| 114 | org_slug: &str, |
| 115 | subject_type: GrantSubjectType, |
| 116 | subject_id: Uuid, |
| 117 | ) -> TeamsResult<()> { |
| 118 | validate_mutation_subject(subject_type)?; |
| 119 | let st = subject_type.to_string(); |
| 120 | let path = format!("/orgs/{org_slug}/grants/{st}/{subject_id}"); |
| 121 | client |
| 122 | .delete(&path) |
| 123 | .await |
| 124 | .map_err(|e| map_remote_error(e, format!("org {org_slug}"))) |
| 125 | } |
| 126 | |
| 127 | // --------------------------------------------------------------------------- |
| 128 | // Workspace grants |
nothing calls this directly
no test coverage detected