#681: federated share from the panel - direct user@server candidate #712
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat-681"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #681
Root cause. The panel's federated Add path (built in #603) exists and works —
sharePick.kind === "federated"posts to/api/v1/ocm/shares, which validates the allow-list, discovers and sends (interop green). But its only candidate source wasshareFedMatches(shareFedContacts, q)— the invited contacts list — and typing deliberately resetssharePick(the #571 pick-to-enable guard). With contacts[], a policy-anyserver could never produce a candidate, so Add stayed disabled./api/v1/recipientsbeing local-only is by design (user-enumeration guard), not the bug.Fix (UI only, no backend change).
shareFedDirect(q, servers, existing)in its ownpure:fed-directlift-block: parsesuser@host, matches the host case-insensitively against allow-listed policy-"any" servers, returns the canonical fqdn, and dedupes against contacts already offered.shareFedServers(policy-anyfqdns fromGET /api/v1/ocm/shares) alongside the contacts fetch.shareSearchRecipientsappends the direct candidate to the federated list — the existing render, pick, Add branch, and boundary note are reused untouched.Decisions. Direct addressing is offered only for policy-
anyservers ("invited contacts only" keeps the contacts flow, matching the admin copy); typinguser@<non-allow-listed host>still offers nothing rather than a row that would 403 on Add.Tests.
web/test/qa681.test.js: unit pins on the lifted helper (valid/unknown-host/malformed/dedupe/case-insensitivity + canonical fqdn) and wiring pins. This unblocks the rest of QA §5 (accept/decline inbound, federated revoke, Shares-view rows).