Skip to content

Only an admin adds a server by its address - #2075

Merged
davidmckayv merged 1 commit into
mainfrom
fix/admin-only-add-server
Nov 23, 2026
Merged

davidmckayv merged 1 commit into
mainfrom
fix/admin-only-add-server

Conversation

@davidmckayv

Copy link
Copy Markdown
Contributor

What

  • Add server is an admin's. A server added by its address on Connections is added for everyone in the organization, and its tools are offered to everybody's Bots. createApp with from=address now answers 403 PERMISSION_DENIED to anybody who isn't an admin, as from=directory already did. Connections offers Add server only to an admin, and to the personal edition's one person. A member who opens /connections/new directly is told an admin adds it, with no form.
  • Spec. createApp says only an admin may add either way. updateOrganizationSettings says the settings sent are saved all or none, and that context is read-only. listAuditEvents lists the new events: organization.deleted, and team.created, team.updated, team.deleted, team.member_added, team.member_role_changed, team.member_removed. Descriptions only: no operation, field, status or code changes. Generated clients regenerated.
  • Activity and Audit words for those seven events in shared/audit-words.ts.

Why

A member could add an organization-wide app by typing an address, which no other way of adding an app allowed. Admin changes are about to be reachable from a Bot, so this has to be closed first.

Checks

  • bun run lint, bun run typecheck, bun run api:lint, bun run api:generate (clean after commit).
  • A client test renders the Add server screen as a member (the admin-only sentence, no form), as an admin, and as the personal edition's person (the form).

…to match

A server added by its address on Connections is added for everyone in the
organization, and its tools are offered to everybody's Bots. The server now
refuses that to anybody who isn't an admin, as it already did for every other
way of adding an app. So Connections only offers Add server to an admin (and to
the personal edition's one person), and a member who opens the Add server
address directly is told an admin adds it instead of being shown a form that
would be refused.

The spec says so for createApp. It also says that updateOrganizationSettings
saves the settings sent all or none, and that context is read-only, and lists
the audit events now recorded for deleting an organization and for every change
to its teams. Those events have words on Activity and Audit.
@davidmckayv
davidmckayv merged commit 645a5a6 into main Nov 23, 2026
33 checks passed
@davidmckayv
davidmckayv deleted the fix/admin-only-add-server branch November 23, 2026 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant