-
Notifications
You must be signed in to change notification settings - Fork 934
fix: return 404 instead of 401 for missing OAuth2 apps #18755
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,36 @@ | ||
{ | ||
"mcpServers": { | ||
"go-language-server": { | ||
"type": "stdio", | ||
"command": "go", | ||
"args": [ | ||
"run", | ||
"github.com/isaacphi/mcp-language-server@latest", | ||
"-workspace", | ||
"./", | ||
"-lsp", | ||
"go", | ||
"--", | ||
"run", | ||
"golang.org/x/tools/gopls@latest" | ||
], | ||
"env": {} | ||
}, | ||
"typescript-language-server": { | ||
"type": "stdio", | ||
"command": "go", | ||
"args": [ | ||
"run", | ||
"github.com/isaacphi/mcp-language-server@latest", | ||
"-workspace", | ||
"./site/", | ||
"-lsp", | ||
"pnpx", | ||
"--", | ||
"typescript-language-server", | ||
"--stdio" | ||
], | ||
"env": {} | ||
} | ||
} | ||
} | ||
"mcpServers": { | ||
"go-language-server": { | ||
"type": "stdio", | ||
"command": "go", | ||
"args": [ | ||
"run", | ||
"github.com/isaacphi/mcp-language-server@latest", | ||
"-workspace", | ||
"./", | ||
"-lsp", | ||
"go", | ||
"--", | ||
"run", | ||
"golang.org/x/tools/gopls@latest" | ||
], | ||
"env": {} | ||
}, | ||
"typescript-language-server": { | ||
"type": "stdio", | ||
"command": "go", | ||
"args": [ | ||
"run", | ||
"github.com/isaacphi/mcp-language-server@latest", | ||
"-workspace", | ||
"./site/", | ||
"-lsp", | ||
"pnpx", | ||
"--", | ||
"typescript-language-server", | ||
"--stdio" | ||
], | ||
"env": {} | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -141,6 +141,7 @@ export const EditOAuth2AppPageView: FC<EditOAuth2AppProps> = ({ | |
confirmLoading={mutatingResource.deleteApp} | ||
name={app.name} | ||
entity="OAuth2 application" | ||
info="⚠️ Warning: Deleting this OAuth2 application will immediately invalidate all active sessions and API keys associated with it. Users currently authenticated through this application will be logged out and need to re-authenticate." | ||
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. Since this message is displayed inside of a |
||
onConfirm={() => deleteApp(app.name)} | ||
onCancel={() => setShowDelete(false)} | ||
/> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
import { screen, waitFor, within } from "@testing-library/react"; | ||
import userEvent from "@testing-library/user-event"; | ||
import * as apiModule from "api/api"; | ||
import type { TemplateVersionParameter, Workspace } from "api/typesGenerated"; | ||
import type { | ||
BuildInfoResponse, | ||
TemplateVersionParameter, | ||
Workspace, | ||
} from "api/typesGenerated"; | ||
import MockServerSocket from "jest-websocket-mock"; | ||
import { | ||
DashboardContext, | ||
|
@@ -554,6 +558,7 @@ describe("WorkspacePage", () => { | |
appearance: MockAppearanceConfig, | ||
entitlements: MockEntitlements, | ||
experiments: [], | ||
buildInfo: { version: "v0.0.0-test" } as BuildInfoResponse, | ||
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: You can use a more complete build info object, from our existent mocks, to avoid casting partial values using To "fix" that you could do: import { MockBuildInfo } from "testHelpers/entities"
return <DashboardContext.Provider
value={{
buildInfo: {
..MockBuildInfo,
version: "v0.0.0-test"
}
}}
/> |
||
organizations: [MockOrganization], | ||
showOrganizations: true, | ||
canViewOrganizationSettings: 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 run python or perl interpreters at all here?
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.
Those are fallbacks in case realpath or readlink are not available.
While working with CC hooks, I noticed that their file paths are wonky. Sometimes, they are relative, and sometimes, they are absolute, often a misformulation of both.
So this is just in case someone develops coder on an env that doesn’t have realpath or readlink.
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.
Can you give an example? I see these available in Nix and they're also available on darwin via Brew /
coreutils
.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.
windows
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.
Unless we don't care about Windows development, then I'm happy to zap this
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.
Actually, this is a CC hook, and CC only works on Linux/macOS.
I'll yeet the fallbacks later.