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

Function list_workspace_grants

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

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

Source from the content-addressed store, hash-verified

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

Callers 1

runMethod · 0.85

Calls 2

map_remote_errorFunction · 0.85
getMethod · 0.65

Tested by

no test coverage detected