You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
WEB-1542: Use Fineract's permission codes for the Organization menu and Centers bulk import - #4372
With MIFOS_PRODUCTION_MODE_ENABLE_RBAC=true, four Organization menu entries and the Centers bulk import Download button check permission codes that don't exist in Fineract, so only super users (ALL_FUNCTIONS) see them. The codes don't start with READ_, so even ALL_FUNCTIONS_READ doesn't match them.
This PR uses Fineract's codes:
Where
Before
After
Organization > Loan Provisioning Criteria
VIEW_PROVISIONS
READ_PROVISIONCRITERIA
Organization > AdHocQuery
VIEW_ADHOC
READ_ADHOC
Organization > SMS Campaigns
VIEW_SMSCAMPAIGNS
READ_SMSCAMPAIGN
Organization > Bulk Import
VIEW_BULKIMPORT
READ_IMPORT
Bulk Import > Centers (Download)
READ_CENTERS
READ_CENTER
The old codes appear nowhere in Fineract's permission setup, and the new ones are in m_permission.
Tested in Chromium against Fineract develop with RBAC on, as a user whose role has only READ_PROVISIONCRITERIA, READ_ADHOC, READ_SMSCAMPAIGN, READ_IMPORT, READ_CENTER and READ_OFFICE (the Centers page needs offices to load): before, the four menu entries and the Download button are hidden; after, all of them show. ESLint and Prettier pass. No new dependencies.
…nd Centers bulk import
Loan Provisioning Criteria, AdHocQuery, SMS Campaigns and Bulk Import
checked VIEW_* codes, and the Centers bulk import READ_CENTERS, none of
which exist in Fineract, so with RBAC enabled only super users saw them.
Reviewing files that changed from the base of the PR and between 71df1f7 and 5cc544e.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
Note
.coderabbit.yaml has unrecognized properties
CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.
Parsing warnings: 2
Validation error: Unrecognized key: "instructions" at "reviews"; Unrecognized key: "pre_merge_checks"
If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
No actionable comments were generated in the recent review.
Walkthrough
The Centers entry and four organization menu entries now check updated READ_* permission identifiers instead of the previous identifiers.
The Centers entry now checks READ_CENTER. The provisioning criteria, ad hoc query, SMS campaigns, and bulk import entries now check READ_PROVISIONCRITERIA, READ_ADHOC, READ_SMSCAMPAIGN, and READ_IMPORT.
This change aligns five menu and button permission checks with the permission codes Fineract uses, so users with those read permissions can see the Organization entries and the Centers bulk import Download button. The change is small and easy to revert. No concrete defect was found.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title names the two main changes: switching the Organization menu to Fineract's READ_* permission codes and switching the Centers bulk import permission. The raw summary shows the menu checks for …
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the two main changes: switching the Organization menu to Fineract's READ_* permission codes and switching the Centers bulk import permission. The raw summary shows the menu checks for provisioning criteria, ad hoc query, SMS campaigns, and bulk import, plus the Centers bulk import READ_CENTERS to READ_CENTER change. The title is specific and matches the changeset. It is 91 characters, slightly long, but it is still clear.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.
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
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.
Description
With
MIFOS_PRODUCTION_MODE_ENABLE_RBAC=true, four Organization menu entries and the Centers bulk import Download button check permission codes that don't exist in Fineract, so only super users (ALL_FUNCTIONS) see them. The codes don't start withREAD_, so evenALL_FUNCTIONS_READdoesn't match them.This PR uses Fineract's codes:
VIEW_PROVISIONSREAD_PROVISIONCRITERIAVIEW_ADHOCREAD_ADHOCVIEW_SMSCAMPAIGNSREAD_SMSCAMPAIGNVIEW_BULKIMPORTREAD_IMPORTREAD_CENTERSREAD_CENTERThe old codes appear nowhere in Fineract's permission setup, and the new ones are in
m_permission.Tested in Chromium against Fineract develop with RBAC on, as a user whose role has only
READ_PROVISIONCRITERIA,READ_ADHOC,READ_SMSCAMPAIGN,READ_IMPORT,READ_CENTERandREAD_OFFICE(the Centers page needs offices to load): before, the four menu entries and the Download button are hidden; after, all of them show. ESLint and Prettier pass. No new dependencies.Related issues and discussion
Screenshots, if any
Checklist
If you have multiple commits please combine them into one commit by squashing them.
Read and understood the contribution guidelines at
web-app/.github/CONTRIBUTING.md.Summary by CodeRabbit