[LFXV2-989] Update OpenFGA authorization model to v9#105
Conversation
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughThe OpenFGA model is bumped from version 8 to 9, restructuring vote and survey access control. Type Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Pull request overview
This PR updates the OpenFGA authorization model from version 8 to version 9, introducing a new survey feature and refactoring the vote authorization model for better access control and consistency.
Changes:
- Renamed
individual_votetovote_responsewith anownerrelation and removedvote_resultstype - Enhanced
votetype withparticipant,results_viewer, and conditionalvote_for_participant_result_accessrelations - Introduced
surveyandsurvey_responsetypes mirroring the vote authorization patterns
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Enhances vote and survey authorization with improved access control: - Rename individual_vote to vote_response with owner relation - Add participant and results_viewer relations to vote type - Introduce survey and survey_response types with similar access patterns - Add conditional access for participants to view aggregate results - Improve auditor access definitions across vote and survey types 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: Andres Tobon <andrest2455@gmail.com>
d8b2410 to
d32af7e
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@charts/lfx-platform/templates/openfga/model.yaml`:
- Around line 298-301: Update the outdated comment above the OpenFGA definitions
to reflect current semantics: replace or remove the line stating "auditor has
access to participants, viewer does not" because the `viewer` relationship now
includes `participant` (as seen in the `define participant: [user]` and `define
viewer: [user:*] or auditor or participant` entries used in `vote` and
`survey`); ensure the comment accurately describes that `viewer` includes
`participant` access or simply remove the misleading sentence and add a concise
note naming the three definitions (`auditor`, `participant`, `viewer`) and their
effective membership.
Summary
Updates the OpenFGA authorization model from version 8 to version 9 with enhanced vote and survey authorization:
individual_votetovote_responsewith owner relationparticipantandresults_viewerrelations to vote typesurveyandsurvey_responsetypes with similar access patternsTicket
LFXV2-989
🤖 Generated with Claude Code