Commit Graph
3 Commits
Author SHA1 Message Date
erikbrockoandClaude Opus 5.5 13e3a62042 Answer what we may do in one place: Permissions
The rules were spread over ServerSession's can* methods, ServerModel's
permits/mayHavePower/canDelete*, TeamspeakConnection and AvatarAdmin, and
Swing dialogs and Android's ServerController passed raw permission names.
Permissions now holds the server's permission table and the rules (offered
until the server says, unreported powers unknown until asked) and answers
one named question per capability. ServerSession.permissions() is the gate
for frontends: Permissions.NONE, allowing nothing, while disconnected.
ServerController's forwarding properties go the same way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 16:53:11 +00:00
erikbrockoandClaude Opus 5.5 e255a4669c Parse a client's properties once, for joins and updates alike
onClientJoin set every field and onClientChanged set the same ones again
behind presence checks, so the two drifted: a client entering as channel
commander showed as none until they toggled it, and the description they
entered with was dropped. applyClientProperties now maps each field once,
only when the event carries it, as applyChannelProperties does for
channels; the update keeps its side effects (info refresh, contacts,
unread count, announcements).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 16:47:34 +00:00
erikbrockoandClaude Opus 5.5 0552ed8be6 Requests return futures that fail with a typed RequestException
Server requests on TeamspeakConnection took callbacks given a value and an
error string, null on success, so frontends told a permission refusal from
other failures by the message's wording (ban list, server log) and core
needed a sentinel message for a refused search. They now return a
CompletableFuture that fails with a RequestException carrying the kind
(not connected, permission, failed) and the server's reason.

Replies hands the outcome to a success or a failure handler on a given
executor; Swing's Edt runs them on the event thread, so call sites no
longer marshal by hand. Android's ServerController, whose suspend calls
answered a String? that was null once done, returns Result instead.
lookupDatabaseClient answers an Optional rather than null.

Starts the structural audit in AUDIT-STRUCTURE.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 16:25:07 +00:00