fix: Require GitHub account ownership when connecting an installation (#14323)

This commit is contained in:
Tom Moor authored and GitHub committed 2026-10-24 18:52:43 -04:00
1 parent b0b307259a
commit 71af4d6901
6 files changed
+304 -15

No files matched your search

+26
View File
@@ -18,6 +18,7 @@ import Time from "~/components/Time";
import env from "~/env";
import useQuery from "~/hooks/useQuery";
import useStores from "~/hooks/useStores";
import isCloudHosted from "~/utils/isCloudHosted";
import { isTruthyQueryValue } from "~/utils/urls";
import GitHubIcon from "./Icon";
import { GitHubConnectButton } from "./components/GitHubButton";
@@ -58,6 +59,31 @@ function GitHub() {
</Trans>
</Notice>
)}
{error === "denied" && (
<Notice>
<Trans>
Only an owner of the GitHub account or organization can connect it
to {{ appName }}.
</Trans>
</Notice>
)}
{error === "missing_permission" && (
<Notice>
{isCloudHosted ? (
<Trans>
The GitHub app needs new permissions for the organization. Ask an
owner of the organization to accept them in GitHub, then try
again.
</Trans>
) : (
<Trans>
The GitHub app needs the “Members” read permission for the
organization. Add this permission to your GitHub app, then ask an
owner of the organization to accept it in GitHub and try again.
</Trans>
)}
</Notice>
)}
{isTruthyQueryValue(installRequest) && (
<Notice>
<Trans>