-
Notifications
You must be signed in to change notification settings - Fork 23
WIP: feat: crud workspaces #72
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
Conversation
f29dd17
to
4024189
Compare
I see some plugins asking to confirm the "name" of the thing you want to delete. Probably we want to do the same. What do you think? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any plans to add support for an "edit' button which goes to the workspace settings?
if (agents.length === 1) { | ||
folderPath = agents[0].expanded_directory | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there is more than 1 agent, does everything fail? Should we randomly choose one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is a good question. I am not changing the actual behavior, just extracted it to a new function. the current version also does this agents[0]
choice =/ . I am not sure what is the best way to handle multiple agents...
if (user.roles.find((role) => role.name === "owner")) { | ||
await vscode.commands.executeCommand("setContext", "coder.isOwner", true) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to check for the owner role? We prefer to do capability checks. You can send a payload to https://dev.coder.com/api/v2/authcheck
to see if you can do something. Eg:
{
"checks":{
"readAllUsers":{
"object":{
"resource_type":"user"
},
"action":"read"
},
},
}
Is this just to see if we have arbitrary execution of all workspaces?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is ok for now, we but we might want to change this soon, especially with coder/coder#6875
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We decided to only show the "all Workspaces" view for users who have the owner role. sure we can revisit this after the owner connections PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FE code LGTM
#64
https://www.loom.com/share/269af08124544e81a5e58471ffe2a67c