WIP: feat(defaults/withRules): add permission rule wrapper #108

Draft
djalim wants to merge 4 commits from feature/permission-system into develop

4 Commits

Author SHA1 Message Date
djalim 401160aa30 refactor(notes): improve error handling and formatting
Check Deno code / Check Deno code (pull_request) Successful in 5s
Tests / Unit tests (pull_request) Successful in 11s
Tests / Integration tests (pull_request) Failing after 1m18s
docs: update CLAUDE.md formatting
2026-04-27 19:45:26 +02:00
djalim 9368e68622 refactor(notes): replace AuthenticatedState with withRules, simplify handlers
refactor: add withRules wrapper to API routes

Use withRules to enforce permissions instead of manual checks.
Remove FORBIDDEN constant, simplify handlers, import withRules,
adjust GET/POST/PUT/DELETE handlers.
Centralizes auth logic.

refactor: replace manual auth checks with withRules wrapper for routes

refactor(student routes): replace manual employee checks with withRules wrapper
2026-04-27 19:45:26 +02:00
djalim e2d22ff4b3 feat(defaults/withRules.ts): add own_teaching_note rule for teacher access 2026-04-27 19:45:26 +02:00
djalim ad64fd0a99 feat(defaults/withRules): add permission rule wrapper 2026-04-27 19:45:26 +02:00