List all permission grants on an organization. # Errors Returns [`TeamsError::OrgNotFound`] if the org does not exist, or [`TeamsError::PermissionDenied`] if the caller lacks access.
(
client: &StorageClient,
org_slug: &str,
)
| 52 | /// [`TeamsError::PermissionDenied`] |
| 53 | /// if the caller lacks access. |
| 54 | pub async fn list_org_grants( |
| 55 | client: &StorageClient, |
| 56 | org_slug: &str, |
| 57 | ) -> TeamsResult<Vec<GrantInfo>> { |
| 58 | let path = format!("/orgs/{org_slug}/grants"); |
| 59 | client |
| 60 | .get(&path) |
| 61 | .await |
| 62 | .map_err(|e| map_remote_error(e, format!("org {org_slug}"))) |
| 63 | } |
| 64 | |
| 65 | /// Add a permission grant to an organization. |
| 66 | /// |
nothing calls this directly
no test coverage detected