FINERACT-2639: enforce office hierarchy access checks - #6260
Open
Disha2002 wants to merge 1 commit into
Open
Conversation
Author
|
@adamsaghy Please review the when you have a chance. |
Disha2002
marked this pull request as draft
August 11, 2026 14:24
adamsaghy
marked this pull request as ready for review
August 11, 2026 14:25
Disha2002
force-pushed
the
FINERACT-2639
branch
from
August 11, 2026 14:43
18be979 to
4f20e2d
Compare
- add office hierarchy authorization checks in transfer, loan, and savings write flows - add unit tests and integration tests for deny/allow office-scope scenarios - wire PlatformSecurityContext in account configuration
Disha2002
force-pushed
the
FINERACT-2639
branch
from
August 11, 2026 15:50
4f20e2d to
ad64385
Compare
elnafateh
suggested changes
Aug 11, 2026
elnafateh
left a comment
Contributor
There was a problem hiding this comment.
run these first before pushing any changes :
./gradlew --no-daemon spotlessApply spotbugsMain spotbugsTest checkstyleMain checkstyleTest
./gradlew --no-daemon build -x test -x cucumber -x doc
Contributor
|
you also need to sign your commits |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add office hierarchy authorization checks after account and loan reads in write services. Add focused unit tests and account transfer integration tests for sibling-office denial and same-hierarchy success. Include Office hierarchy regeneration test support changes.
Description
This PR implements FINERACT-2639 by enforcing office-hierarchy authorization checks across write flows that read loan, savings, and account entities before performing operations.
What changed
Added office-hierarchy access validation to the account transfer write flow to prevent cross-branch access when the authenticated user is outside the target office hierarchy.
Added authorization checks across loan write-service paths after entity assembly/read points to ensure office scope is consistently enforced.
Added authorization checks across savings write-service paths after entity assembly/read points to ensure office scope is consistently enforced.
Added focused unit tests verifying that loan and savings write-service operations invoke office-hierarchy validation.
Added integration tests for account-transfer authorization:
Added office-hierarchy regeneration test coverage to protect hierarchy propagation behavior.
Why
Previously, some write operations could read domain entities and proceed without a consistent office-hierarchy authorization check at all relevant entry points.
This change closes those authorization gaps and makes office-hierarchy enforcement explicit and test-covered across the affected write flows.
Testing
Added/updated targeted unit tests for loan and savings write authorization checks.
Added integration tests for account-transfer authorization:
Added office-hierarchy regeneration test coverage.
Full test execution in this workspace is currently blocked by unrelated compilation issues in
fineract-working-capital-loan.Risk and impact
Checklist
Please make sure these boxes are checked before submitting your pull request - thanks!
Your assigned reviewer(s) will follow our guidelines for code reviews.