Repository navigation
feat(collab): add addTeamUser to CollabsClient - #110
Draft
ehennestad wants to merge 2 commits into
Draft
ehennestad wants to merge 2 commits into
ehennestad wants to merge 2 commits into
Conversation
Contributor
Test Results873 tests 862 ✅ 42s ⏱️ Results for commit 38e10c6. ♻️ This comment has been updated with latest results. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## add-environment-preference #110 +/- ##
==============================================================
+ Coverage 90.43% 90.46% +0.03%
==============================================================
Files 137 137
Lines 3555 3567 +12
==============================================================
+ Hits 3215 3227 +12
Misses 340 340 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
ehennestad
force-pushed
the
add-collab-team-user-method
branch
2 times, most recently
from
November 11, 2026 10:42
da99193 to
7b6ba1f
Compare
addTeamUser sends PUT /rest/v1/collabs/{collabId}/team/{role}/users/
{username}, which gives a user the role "viewer", "editor" or
"administrator" in a collab. A 204 (No Content) response is the
success case, as documented in the OpenAPI spec of the Collaboratory
API; any other status is reported through throwError.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The team endpoint is a PUT without a body. MATLAB warns (MATLAB:http:BodyExpectedFor) when such a request is sent, so every call to addTeamUser printed the warning. The warning is turned off for the request and restored afterwards, as BucketsClient does for its PUT requests without a body. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
ehennestad
force-pushed
the
add-collab-team-user-method
branch
from
November 11, 2026 18:58
f8231d3 to
38e10c6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ebrains.collab.api.CollabsClientcould create a collab but not give anyone access to it. This PR addsaddTeamUser(collabId, role, username), which sendsPUT /rest/v1/collabs/{collabId}/team/{role}/users/{username}without a body.collabIdis the name of the collab, thenamefield of the collabs thatsearchCollabsreturns.rolemust be"viewer","editor"or"administrator", the role names the OpenAPI spec of the Collaboratory API gives for collabs.throwError. The spec documents 400 when the user does not exist, 403 when the account sending the request is not an administrator of the collab, and 404 when the collab does not exist.The spec has the same endpoint for units and groups (
.../team/{role}/units/{unitId},.../team/{role}/groups/{groupName}); this PR covers users only.The request and response shapes come from the spec.
🤖 Generated with Claude Code