List all permission grants on a workspace. # Errors Returns [`TeamsError::PermissionDenied`](crate::error::TeamsError::PermissionDenied) if the caller lacks read access, or a not-found error if the workspace doesn't exist.
(
client: &StorageClient,
workspace_slug: &str,
)
| 117 | /// if the caller lacks read access, or a not-found error if the workspace |
| 118 | /// doesn't exist. |
| 119 | pub async fn list_workspace_grants( |
| 120 | client: &StorageClient, |
| 121 | workspace_slug: &str, |
| 122 | ) -> TeamsResult<Vec<crate::types::WorkspaceGrantInfo>> { |
| 123 | let path = format!("/workspaces/{workspace_slug}/grants"); |
| 124 | client |
| 125 | .get(&path) |
| 126 | .await |
| 127 | .map_err(|e| map_remote_error(e, format!("workspace {workspace_slug}"))) |
| 128 | } |
| 129 | |
| 130 | /// Add a permission grant to a workspace. |
| 131 | /// |
no test coverage detected