-
Notifications
You must be signed in to change notification settings - Fork 375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add GET /api/v1/me/workspaces
& update Workspace
class
#3390
Conversation
When checking `self.role` we were checking the user's instance role, not the active user one
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## develop #3390 +/- ##
===========================================
+ Coverage 90.13% 90.49% +0.35%
===========================================
Files 233 240 +7
Lines 12493 12925 +432
===========================================
+ Hits 11261 11696 +435
+ Misses 1232 1229 -3
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
Description
This PR adds the
/api/v1/me/workspaces
endpoint in the API V1, and also updates theWorkspace
accordingly so that both users with role annotator and/or admin, can list the workspaces they are part of.So on, the bug related to the access to the
User.workspaces
property is now solved, as before just theowners
were able to access it and print the model (asworkspace
was part of the repr).Besides that, some minor things have also been tackled as part of this PR:
Workspace.delete_user
to users with roleowner
onlyType of change
(Please delete options that are not relevant. Remember to title the PR according to the type of change)
How Has This Been Tested
/api/v1/me/workspaces
list_workspaces_me
in Python SDKUser.workspaces
in Python clientAll the above tested for all the roles: owner, admin, and annotator.
Checklist