Skip to content

fix: limit bulk actions to rows the user can access - #225

Merged
buzz-code merged 2 commits into
mainfrom
claude/project-thread-mg93un
Oct 18, 2026
Merged

buzz-code merged 2 commits into
mainfrom
claude/project-thread-mg93un

Conversation

@buzz-code

Copy link
Copy Markdown
Owner

Requested by הדסה · project thread

Before: bulk actions updated rows by the ids sent from the client, with no ownership check. A user could change another account's rows by sending their ids.

After: every bulk action first resolves the selected ids through getManyByIds, which applies the crudAuth filter. Ids the caller can't see are dropped, and if none are left the action returns "לא נבחרו רשומות".

How: same pattern attendance-cleanup-rule already uses. Covered actions:

  • attendance: bulkEdit, bulkKnownAbsences, fixStudentReferenceV2, fixReferences
  • klass, student_klass: fixReferences
  • student: bulkUpdateActive
  • report_group: updateSignatureData
  • report_group_session: adjustTime

Tests: added cases for an id the caller can't access. Server tsc and the full jest run pass (1151 tests).


Generated by Claude Code

Bulk actions took row ids straight from the request, so a user could
change another account's rows by sending their ids. Resolve the ids
through getManyByIds (crudAuth filter) before updating, in attendance
bulk edit, approved absences, fix references, student active toggle,
report group signature and session time adjustment.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Ju7CjT3xeJYnaF7vU93GJ
@buzz-code buzz-code self-assigned this Oct 18, 2026
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Ju7CjT3xeJYnaF7vU93GJ
@buzz-code
buzz-code merged commit 344950f into main Oct 18, 2026
4 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.

2 participants