Skip to content

Document the folder permission socket events (GRYT-1349) - #127

Merged
sivert-io merged 2 commits into
mainfrom
claude/GRYT-1349-folder-permission-events
Sep 23, 2026
Merged

sivert-io merged 2 commits into
mainfrom
claude/GRYT-1349-folder-permission-events

Conversation

@sivert-io

Copy link
Copy Markdown
Member

Adds the folder permission socket events that server#207 (GRYT-1306) shipped, now that client#638 makes channels follow a folder by default.

Task: https://tasks.sivert.io/tasks/1406

Events documented

  • server:channels:scope:follow — drops a channel's own scope, back to following its folder
  • server:folders:scope:get, server:folders:scope:set — read and set a folder's scope, same shape as the per-channel pair
  • server:folders:scope — the reply, with channelCount
  • Noted on the existing server:channels:scope reply: it now carries followsFolder and the folder's id/name
  • Noted on server:sidebar: it drops a channel the caller can't see and a folder left with none of its channels showing, unless the caller holds manage_channels

All need manage_channels, same as the channel-scope events next to them.

Inheritance

Added a short paragraph above the Administration table: a channel in a folder follows the folder's scope while it has none of its own, setting one (Everyone included) sticks, and pulling a channel out of a folder or deleting the folder leaves it holding whatever scope it was reading rather than reverting to Everyone. Checked this against resolveChannelScopes, keepScopesOfChannelsLeavingFolders and where it's called from upsertServerSidebarItem and deleteServerSidebarItem in packages/server/src/db/sqlite/channels.ts.

Other pages

No owner-facing page documents per-channel or per-folder permission scopes at all yet — use/roles.mdx only covers roles and rank. Nothing to update there for this PR; that gap is bigger than this task.

Checked

  • yarn test:comment-length
  • yarn test:webhook-spec
  • yarn build

🤖 Generated with Claude Code

sivert-io and others added 2 commits September 23, 2026 09:17
server#207 (GRYT-1306) gave folders a permission scope and added
server:folders:scope:get, server:folders:scope:set and
server:channels:scope:follow, plus client#638 made channels follow a
folder by default. None of it was on the socket reference, which listed
only the per-channel scope events. Adds the three events, the
server:folders:scope reply, and a short paragraph on how a channel
keeps its scope when it leaves a folder or the folder is deleted.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…RYT-1349)

Vikunja's task description for this one flagged it alongside the folder
scope events: a member without manage_channels never sees a channel's row
if they can't read it, or a folder left with none of its channels showing.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@sivert-io
sivert-io merged commit 8b3181d into main Sep 23, 2026
6 checks passed
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