-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(social-insurance-administration): Read permission for applicants with rejected applications #16688
base: main
Are you sure you want to change the base?
Conversation
…with rejected applications
WalkthroughThe changes in this pull request enhance the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (3)
libs/application/templates/social-insurance-administration/pension-supplement/src/lib/PensionSupplementTemplate.ts (1)
Line range hint
374-377
: Address TODO comment regarding state transitions.The TODO comment indicates uncertainty about how TR (Tryggingastofnun) handles state transitions. This should be clarified and documented to ensure the implementation correctly reflects the actual behavior.
Would you like me to help create a GitHub issue to track this TODO item?
libs/application/templates/social-insurance-administration/household-supplement/src/lib/HouseholdSupplementTemplate.ts (1)
Line range hint
353-359
: Consider addressing the TODO comment about status changes.There's a TODO comment indicating potential changes needed for TR status changes. This might affect how rejections are handled and should be reviewed in the context of this permission change.
Would you like me to help create a GitHub issue to track the implementation of TR status changes?
libs/application/templates/social-insurance-administration/additional-support-for-the-elderly/src/lib/AdditionalSupportForTheElderlyTemplate.ts (1)
363-363
: Documentation update needed.Consider updating the documentation to reflect this change in permissions, particularly noting that applicants can now view their rejected applications.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (3)
libs/application/templates/social-insurance-administration/additional-support-for-the-elderly/src/lib/AdditionalSupportForTheElderlyTemplate.ts
(1 hunks)libs/application/templates/social-insurance-administration/household-supplement/src/lib/HouseholdSupplementTemplate.ts
(1 hunks)libs/application/templates/social-insurance-administration/pension-supplement/src/lib/PensionSupplementTemplate.ts
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
libs/application/templates/social-insurance-administration/additional-support-for-the-elderly/src/lib/AdditionalSupportForTheElderlyTemplate.ts (1)
Pattern libs/**/*
: "Confirm that the code adheres to the following:
- Reusability of components and hooks across different NextJS apps.
- TypeScript usage for defining props and exporting types.
- Effective tree-shaking and bundling practices."
libs/application/templates/social-insurance-administration/household-supplement/src/lib/HouseholdSupplementTemplate.ts (1)
Pattern libs/**/*
: "Confirm that the code adheres to the following:
- Reusability of components and hooks across different NextJS apps.
- TypeScript usage for defining props and exporting types.
- Effective tree-shaking and bundling practices."
libs/application/templates/social-insurance-administration/pension-supplement/src/lib/PensionSupplementTemplate.ts (1)
Pattern libs/**/*
: "Confirm that the code adheres to the following:
- Reusability of components and hooks across different NextJS apps.
- TypeScript usage for defining props and exporting types.
- Effective tree-shaking and bundling practices."
🔇 Additional comments (4)
libs/application/templates/social-insurance-administration/pension-supplement/src/lib/PensionSupplementTemplate.ts (2)
339-339
: LGTM! Permission change aligns with requirements.
The addition of read: 'all'
permission for applicants in the REJECTED
state directly addresses the PR objective, allowing applicants to view their answers after rejection. This implementation is consistent with similar changes in other templates.
Line range hint 1-50
: Excellent TypeScript implementation and architecture.
The implementation demonstrates strong TypeScript practices:
- Proper use of generics for type safety in the application template
- Well-structured imports from shared libraries promoting reusability
- Clear type definitions for the state machine configuration
libs/application/templates/social-insurance-administration/household-supplement/src/lib/HouseholdSupplementTemplate.ts (1)
357-357
: LGTM! Permission change aligns with requirements.
The addition of read: 'all'
permission for the APPLICANT
role in the REJECTED
state correctly implements the requirement to allow applicants to view their rejected applications.
Let's verify consistent implementation across other templates:
libs/application/templates/social-insurance-administration/additional-support-for-the-elderly/src/lib/AdditionalSupportForTheElderlyTemplate.ts (1)
363-363
: LGTM! Verify similar changes in related templates.
The addition of read: 'all'
permission for the APPLICANT role in the REJECTED state correctly addresses the issue of applicants being unable to view their rejected applications. This change follows the same pattern used in other states and maintains proper security scoping.
Let's verify that similar changes exist in related templates:
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #16688 +/- ##
=======================================
Coverage 36.64% 36.64%
=======================================
Files 6873 6872 -1
Lines 143142 143065 -77
Branches 40807 40766 -41
=======================================
- Hits 52448 52424 -24
+ Misses 90694 90641 -53
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 8 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Datadog ReportAll test runs ✅ 4 Total Test Services: 0 Failed, 4 Passed Test Services
|
Fix read permission for applicants with rejected applications. As of now applicants cannot see their answers for rejected applications
Attach a link to issue if relevant
What
Specify what you're trying to achieve
Why
Specify why you need to achieve this
Screenshots / Gifs
Attach Screenshots / Gifs to help reviewers understand the scope of the pull request
Checklist:
Summary by CodeRabbit
New Features
Bug Fixes
Documentation