Skip to content
This repository was archived by the owner on Aug 4, 2026. It is now read-only.

fix: correct OR delete API, add booking read auth, and enforce user field on create - #68

Merged
rubenvdlinde merged 1 commit into
developmentfrom
fix/or-api-booking-auth
May 28, 2026
Merged

rubenvdlinde merged 1 commit into
developmentfrom
fix/or-api-booking-auth

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

Summary

  • C1: Replace non-existent ObjectService::delete() call with the canonical deleteObject(uuid, register, schema) signature; align ItemServiceTest stub to match.
  • H1: Add POST /api/items create endpoint that forces booking.user to the caller's own UID for non-admins, preventing user impersonation.
  • H2: Add per-user read authorization rule to the booking schema so users only see their own bookings; bump booking schema to 0.3.0 and register to 0.5.0 to trigger reimport.
  • H3: Bump appinfo/info.xml to 0.2.0 to bust the immutable JS bundle cache.

Test plan

  • 29 unit tests pass (was 27; 2 new tests cover create() service method)
  • PHPStan reports no errors
  • POST /api/items with non-admin user: confirm booking.user is always set to the acting user
  • GET /api/objects/{registerId}/booking as non-owner: confirm 403 (H2 read auth)
  • GET /api/objects/{registerId}/booking as booking owner/subject: confirm 200

…ield on create

C1: replace non-existent ObjectService::delete() with deleteObject(uuid, register, schema) and align test stub to the canonical signature.
H1: add POST /api/items create endpoint that forces booking.user to the caller's UID for non-admins, preventing user impersonation.
H2: add per-user read authorization to the booking schema so users only see their own bookings; bump booking schema to 0.3.0 and register to 0.5.0 to trigger reimport.
H3: bump appinfo/info.xml to 0.2.0 to bust the immutable JS bundle cache.
@rubenvdlinde
rubenvdlinde merged commit 0dc4274 into development May 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant