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

Function list_workspace_grants

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

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

Source from the content-addressed store, hash-verified

136/// if the caller lacks read access, or a not-found error if the workspace
137/// doesn't exist.
138pub 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///

Callers 1

runMethod · 0.85

Calls 2

map_remote_errorFunction · 0.85
getMethod · 0.65

Tested by

no test coverage detected