Skip to content

WEB-1542: Use Fineract's permission codes for the Organization menu and Centers bulk import - #4372

Merged
IOhacker merged 2 commits into
openMF:devfrom
samchinmaya:WEB-1542-organization-permission-codes
Dec 1, 2026
Merged

IOhacker merged 2 commits into
openMF:devfrom
samchinmaya:WEB-1542-organization-permission-codes

Conversation

@samchinmaya

@samchinmaya samchinmaya commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

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 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.

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

  • Bug Fixes
    • Corrected permission checks for bulk imports and organization menu entries, so access is evaluated using the corresponding read permissions.

…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.
@samchinmaya
samchinmaya requested a review from a team November 30, 2026 03:57
@coderabbitai

coderabbitai Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Explain Change →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration

  • Source mode: Auto
  • Repository: openMF/web-app
  • Branch: dev
  • File: .coderabbit.yaml
  • Commit: cd32a90
  • Layers: Repository YAML
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2fe0d049-c450-4c2c-9e16-1139a306a36f
Commits

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"
Configuration instructions

  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • 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.

Changes

Organization permission checks

Layer / File(s) Summary
Update permission checks
src/app/organization/bulk-import/view-bulk-import/bulk-imports.ts, src/app/organization/organization.component.html
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.

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix

Suggested reviewers: alberto-art3ch, adamsaghy, omar-nabil2

Merge Risk: Minimal · previous review 71df1

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: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed 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 Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed 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.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: openMF/web-app
  • Branch: dev
  • File: .coderabbit.yaml
  • Commit: 6b8b84d
  • Layers: Repository YAML
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d8949a79-a5eb-4737-bd45-27aec172a8b2
Commits

Reviewing files that changed from the base of the PR and between 6b8b84d and 71df1f7.

Files selected for processing: 2

  • src/app/organization/bulk-import/view-bulk-import/bulk-imports.ts
  • src/app/organization/organization.component.html

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

@IOhacker
IOhacker merged commit 4c10d90 into openMF:dev Dec 1, 2026
6 of 7 checks passed
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