Skip to content

Show the workspace's own footer links to its members - #1052

Merged
helpcodeai merged 5 commits into
mainfrom
fix/footer-links-cloud
Oct 13, 2026
Merged

helpcodeai merged 5 commits into
mainfrom
fix/footer-links-cloud

Conversation

@helpcodeai

@helpcodeai helpcodeai commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Workspace admins save footer links under Settings → Administration. PUT /api/admin/settings/footer-links stores them in the workspace's org_settings. The footer, though, only read GET /api/site-settings/footer-links, a public route that returns the instance-wide site_settings list. On Cloud every workspace has its own admin, so the links an admin saved never appeared anywhere. I found this while checking what we can tell a prospect about branding (12 Oct).

Changes

  • Backend: new SiteSettingsMemberController with GET /api/settings/footer-links.
    • It is JWT-only and open to any role.
    • It returns OrgSettingsService.getFooterLinks(orgId): the workspace's links, falling back to the instance-wide links as before.
    • It returns [] when the token carries no workspace.
  • Frontend:
    • When signed in, the footer reads the workspace links. If that call fails it falls back to the public list, and signed-out pages keep the public list.
    • After an admin saves the links, both admin settings pages fire amcp:footer-links-changed, so the footer reloads without a page refresh.
  • URL scheme: the links are now shown on the app's own origin, so the admin PUT only accepts https://, http:// or mailto: (@Matches on FooterLinkDto.url), and the footer skips any other scheme saved before this check. Production check on 12 Oct: one workspace has footer links, and none use another scheme.
  • The public route and the admin GET are unchanged.

Tenant isolation

  • The workspace comes from the verified token. JwtStrategy.validate re-reads the user's active membership from the database, and the endpoint takes no org parameter, so a member can only ever read their own workspace's links.
  • The data is a label and a URL that the workspace's own admin already shows to its members.

Cloud vs self-hosted

  • Cloud: each workspace now sees its own links. Workspaces that saved none see the instance-wide list, which is the same as before.
  • Self-hosted: usually there's one workspace, so the links the admin saved now show too. Before, the footer showed the instance-wide list, which the admin UI doesn't write to.

Testing

  • site-settings.controller.spec.ts:
    • the endpoint returns the caller's links;
    • it returns [] when there's no workspace;
    • it requires JWT and has no role restriction;
    • URL validation accepts https/http/mailto and refuses javascript:, data:, relative and ftp:.
  • tests/e2e/footer-links.spec.ts:
    • a signed-in member sees the workspace links and not the instance ones;
    • a javascript: link saved earlier is not rendered;
    • when the workspace call fails, the footer falls back to the public list.

Commands run:

  • packages/backend:
    • npx tsc --noEmit -p tsconfig.json: OK
    • npx jest src/settings: 646 passed
    • npx eslint on the changed files: clean
  • packages/frontend:
    • npx tsc --noEmit -p tsconfig.json: OK
    • npx eslint on the changed files: 0 errors, 1 warning
    • npx playwright test tests/e2e/footer-links.spec.ts: 2 passed

Not merged or deployed.

Admins save footer links per workspace (org_settings), but the footer
read only the instance-wide list from the public route, so on Cloud the
links a workspace admin saved never appeared. A new GET
/api/settings/footer-links (any signed-in member) returns the caller's
workspace links with the instance-wide ones as fallback; the footer uses
it when signed in, falls back to the public list on error, and reloads
after an admin saves.
helpcodeai and others added 2 commits October 12, 2026 17:34
The links a workspace admin saves are now shown on the app's own origin to
every member of that workspace, so the URL is limited to web and mail
links on save (no javascript:, data: or other schemes), and the footer
skips any link saved before this check.
@helpcodeai
helpcodeai enabled auto-merge (squash) October 12, 2026 15:59
@helpcodeai
helpcodeai merged commit 7e2f1ca into main Oct 13, 2026
13 checks passed
@helpcodeai
helpcodeai deleted the fix/footer-links-cloud branch October 13, 2026 08:26
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant