-
-
Notifications
You must be signed in to change notification settings - Fork 161
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
API: Get all workspaces of user returns every workspace as default #587
Comments
Hey @rajdip-b, Please assign it to me. |
You can take up this issue using |
@zaheer-Khan3260, @muntaxir4, any progress here? I can take a look at this issue, just assign it to me, please. |
Sure you ca go for it. |
I`ve managed to reproduce this issue locally. Do you mean only the default workspace of User2 should have |
Yes. Every user has a default workspace. If you get invited to someone else's default workspace, you still own a default workspace of your own. The issue is, right now we are just fetching every workspace without processing the So, what we want is, before sending out the workspace, we want to do a pre-processing that checks the following clause: workspace.isDefault = workspace.isDefault && workspace.ownerId == user.id |
🎉 This issue has been resolved in version 2.10.0-stage.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
🎉 This issue has been resolved in version 2.10.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Describe the bug
All returned workspaces from
/workspace
containsisDefault: true
, whereas only one workspace should be a default one. This happens when a user becomes a member of host's default workpsace.Endpoints Affected
/workspace
/workspace/:workspaceSlug
To Reproduce
Steps to reproduce the behavior:
/workpsace
. Each of the workspace hasisDefault
set totrue
.Expected behavior
A single Default workspace of User2 should have isDefault:true.
The text was updated successfully, but these errors were encountered: