mirror of
https://github.com/outline/outline.git
synced 2026-11-28 08:14:58 +03:00
fix: Require GitHub account ownership when connecting an installation (#14323)
This commit is contained in:
1 parent
b0b307259a
commit
71af4d6901
6 files changed
+304
-15
No files matched your search
@@ -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>
|
||||
|
||||
Reference in new issue
Block a user