List all permission grants on a workspace. # Errors Returns [`TeamsError::PermissionDenied`] if the caller lacks read access, or a not-found error if the workspace doesn't exist.
(
client: &StorageClient,
workspace_slug: &str,
)
| 136 | /// if the caller lacks read access, or a not-found error if the workspace |
| 137 | /// doesn't exist. |
| 138 | pub async fn list_workspace_grants( |
| 139 | client: &StorageClient, |
| 140 | workspace_slug: &str, |
| 141 | ) -> TeamsResult<Vec<crate::types::WorkspaceGrantInfo>> { |
| 142 | let path = format!("/workspaces/{workspace_slug}/grants"); |
| 143 | client |
| 144 | .get(&path) |
| 145 | .await |
| 146 | .map_err(|e| map_remote_error(e, format!("workspace {workspace_slug}"))) |
| 147 | } |
| 148 | |
| 149 | /// Add a permission grant to a workspace. |
| 150 | /// |
no test coverage detected