Skip to content

fix: add watch verb support for user invitations#533

Merged
yahyafakhroji merged 1 commit intomainfrom
fix/userinvitations-watch-rbac
Mar 24, 2026
Merged

fix: add watch verb support for user invitations#533
yahyafakhroji merged 1 commit intomainfrom
fix/userinvitations-watch-rbac

Conversation

@yahyafakhroji
Copy link
Copy Markdown
Contributor

Summary

  • Added iam.miloapis.com/userinvitations.watch permission to the iam-user-self-manage RBAC role, enabling real-time watch streams for user invitations
  • Extended UserUserInvitationListConstraintDecorator filter to apply user-scoping field selectors to watch requests (previously only handled list), preventing users from watching other users' invitations
  • Added 3 test cases for watch verb coverage — all 8 filter tests pass

The portal's real-time notification system uses K8s Watch API to stream
invitation updates via SSE, but watch requests fail with 403 Forbidden
because the iam-user-self-manage role only grants get and list verbs on
userinvitations.

- Add userinvitations.watch permission to iam-user-self-manage role
- Extend UserUserInvitationListConstraintDecorator to scope watch requests
  with the authenticated user's field selector, matching existing list
  behavior. Without this, watch requests would bypass user-scoping.
- Add test cases for watch verb mirroring existing list test coverage
@yahyafakhroji yahyafakhroji requested review from a team, JoseSzycho and scotwells March 23, 2026 13:00
@joggrbot
Copy link
Copy Markdown
Contributor

joggrbot bot commented Mar 23, 2026

📝 Documentation Analysis

All docs are up to date! 🎉


✅ Latest commit analyzed: 4a717fc | Powered by Joggr

@yahyafakhroji yahyafakhroji merged commit 837148e into main Mar 24, 2026
7 of 8 checks passed
@yahyafakhroji yahyafakhroji deleted the fix/userinvitations-watch-rbac branch March 24, 2026 01:46
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