MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / list_org_grants

Function list_org_grants

atomic-teams/src/grant.rs:54–63  ·  view source on GitHub ↗

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,
)

Source from the content-addressed store, hash-verified

52/// [`TeamsError::PermissionDenied`]
53/// if the caller lacks access.
54pub 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///

Callers

nothing calls this directly

Calls 2

map_remote_errorFunction · 0.85
getMethod · 0.65

Tested by

no test coverage detected