Skip to content

fix(lr-eb1a): add missing permission gates on schedule_move, set_session_visibility, kill_process#219

Merged
akuehner merged 2 commits into
mainfrom
fix/lr-eb1a-ws-permission-gates
Jun 11, 2026
Merged

fix(lr-eb1a): add missing permission gates on schedule_move, set_session_visibility, kill_process#219
akuehner merged 2 commits into
mainfrom
fix/lr-eb1a-ws-permission-gates

Conversation

@akuehner

Copy link
Copy Markdown
Member

Three WS handlers in project-sessions.js skipped access-control checks that all sibling handlers enforce. schedule_move: scheduledTasks permission check added. set_session_visibility: canAccessSession guard added. kill_process: added to admin-only gate. Single-user mode unchanged. Resolves lr-eb1a.

akuehner and others added 2 commits June 10, 2026 21:44
…ion_visibility, kill_process

Three WS handlers in project-sessions.js skipped access-control checks
that all sibling handlers enforce:

- schedule_move: add scheduledTasks permission check matching the gate
  already present for schedule_create in project-user-message.js.
  Without this fix, the sessions.js handler short-circuits before the
  gate in project-user-message.js is reached.

- set_session_visibility: add canAccessSession guard before calling
  sm.setSessionVisibility, matching the pattern used by set_session_agent,
  set_session_bookmark, and reorder_session_bookmarks.

- kill_process: add to the admin-only gate block so non-admin users
  cannot SIGTERM other users' claude subprocesses in multi-user mode.

Single-user mode (isMultiUser() === false) behavior is unchanged for
all three fixes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ts for all three WS permission gates

- kill_process gate was dead (handler return true before line-1540 gate);
  moved inline at handler entry matching the update_now pattern (line 533).
- Removed kill_process from the line-1540 gate block (it never reached there).
- test/ws-permission-gates-lr-eb1a.test.js: 7 tests driving real
  attachSessions; covers 3a (schedule_move denied/allowed by scheduledTasks
  perm), 3b (set_session_visibility denied/allowed by canAccessSession), 3c
  (kill_process denied for non-admin, allowed for admin, allowed single-user).

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@akuehner akuehner merged commit 71f1fef into main Jun 11, 2026
1 check passed
@akuehner akuehner deleted the fix/lr-eb1a-ws-permission-gates branch June 11, 2026 01:52
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