v4: an instance that takes no users of others still blocks instances its own users may not sign in to — with GERBEUR_FEDERATION_INCOMING=0, /manage hid its list of instances, though a blocked one still kept the instance's users from signing in there, and no admin could block another. The list now stays while federated sign-in goes either way: without incoming sign-ins it shows and adds only blocked instances, the trusted ones kept for when they're back, and says what blocking does there. Where both ways are on, its note now says that users here can't sign in to a blocked instance either.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
khannurien
2026-10-09 16:33:08 +00:00
parent 83dc44050e
commit 52a23db504
6 changed files with 195 additions and 65 deletions

View File

@@ -16,20 +16,24 @@ import { PageHeader } from "../components/layout/PageHeader.tsx";
import { PageGroup } from "../components/layout/PageGroup.tsx";
import { CategoryManager } from "../components/category/CategoryManager.tsx";
import { PeerManager } from "../components/federation/PeerManager.tsx";
import { FEDERATION_INCOMING } from "../config/instance.ts";
import {
FEDERATION_INCOMING,
FEDERATION_OUTGOING,
} from "../config/instance.ts";
import { NotFound } from "./NotFound.tsx";
/**
* Renders the category manager and the instances the site trusts or blocks,
* each to those who hold its permission, which the API checks again, the
* instances only while users of other instances may sign in here; without
* instances only while federated sign-in goes at least one way; without
* either, the page isn't found.
*/
export function Manage(): React.JSX.Element {
useDocumentTitle(t`Manage`);
const { user } = useRequiredAuth();
const categories = can(user, "category:manage");
const instances = FEDERATION_INCOMING && can(user, "federation:manage");
const instances = (FEDERATION_INCOMING || FEDERATION_OUTGOING) &&
can(user, "federation:manage");
if (!categories && !instances) return <NotFound />;
return (
<PageShell narrow>