-
Notifications
You must be signed in to change notification settings - Fork 993
refactor(coderd): fetch owner information when authorizing workspace agent #9123
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
Changes from 1 commit
11c20d6
da03c4b
317537c
8e2430d
4aa23c6
41561b9
0cb0d18
e6ce0f5
b1d4084
b64a870
73de552
1218fa4
8e222e3
e8844ae
06bbda2
3e21545
3a603fc
267aa6c
6e0d3b3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -229,9 +229,11 @@ FROM users | |
ON | ||
group_members.user_id = users.id | ||
WHERE | ||
-- TODO: we can add more conditions here, such as: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: out of curiosity, why is it left for later improvement? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would change the existing behaviour; right now we just get the agent by the token without further restrictions. |
||
-- 1) The user must be active | ||
-- 2) The user must not be deleted | ||
-- 3) The workspace must be running | ||
workspace_agents.auth_token = @auth_token | ||
AND | ||
users.status = 'active' -- workspaces that belong to inactive users should not be | ||
GROUP BY | ||
workspace_agents.id, workspaces.id, users.id, organization_members.organization_id | ||
LIMIT 1; |
Uh oh!
There was an error while loading. Please reload this page.