Skip to content

WEB-1543: Use Fineract's permission codes for Provisioning Entries - #4373

Merged
IOhacker merged 2 commits into
openMF:devfrom
samchinmaya:WEB-1543-provisioning-entries-permission-codes
Dec 1, 2026
Merged

IOhacker merged 2 commits into
openMF:devfrom
samchinmaya:WEB-1543-provisioning-entries-permission-codes

Conversation

@samchinmaya

@samchinmaya samchinmaya commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Description

With MIFOS_PRODUCTION_MODE_ENABLE_RBAC=true, the Provisioning Entries screens check permission codes that don't exist in Fineract, so only super users (ALL_FUNCTIONS) see them. The menu entry is hidden even for ALL_FUNCTIONS_READ.

This PR uses Fineract's codes:

Where Before After
Accounting > Provisioning Entries (menu entry) VIEW_PROVISIONING_ENTRIES READ_PROVISIONENTRIES
Provisioning Entries > Create Provisioning Entry VIEW_ALL_PROVISIONING_ENTRIES CREATE_PROVISIONENTRIES
Create Provisioning Entry > Submit CREATE_PROVISIONING_ENTRIES CREATE_PROVISIONENTRIES
Provisioning Entry > Create Journal Entries CREATE_JOURNAL_ENTRY CREATE_PROVISIONJOURNALENTRIES

The Create Provisioning Entry button uses the create permission rather than the read one, so read-only users don't get a button whose form they can't submit. Prettier collapses that button's attributes onto one line now that the code is shorter.

Tested in Chromium against Fineract develop with RBAC on, as a user whose role has only READ_PROVISIONENTRIES, CREATE_PROVISIONENTRIES, CREATE_PROVISIONJOURNALENTRIES, plus READ_LOANPRODUCT, READ_PROVISIONCATEGORY and READ_OFFICE (the entry page loads these): before, the menu entry and all three buttons 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

  • Access
    • The Provisioning Entries menu and entry creation controls now follow the updated read and create permissions.
    • Creating provisioning journal entries now follows the updated journal-entry permission. The available actions continue to depend on the permissions assigned to your account.

The Accounting menu entry, Create Provisioning Entry, Submit and Create
Journal Entries checked codes that don't 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: 4c10d90
  • Layers: Repository YAML
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6f455704-0041-4b25-b219-534c67e56adc
Commits

Reviewing files that changed from the base of the PR and between a745de3 and 79b5c93.

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 Provisioning Entries menu item and related actions now check updated permission names. The changes affect the menu, provisioning-entry creation, and journal-entry creation.

Changes

Provisioning-entry permissions

Layer / File(s) Summary
Update provisioning-entry permission gates
src/app/accounting/accounting.component.html, src/app/accounting/provisioning-entries/provisioning-entries.component.html, src/app/accounting/provisioning-entries/create-provisioning-entry/create-provisioning-entry.component.html, src/app/accounting/provisioning-entries/view-provisioning-entry/view-provisioning-entry.component.html
The menu item now checks READ_PROVISIONENTRIES. Both provisioning-entry creation buttons now check CREATE_PROVISIONENTRIES. The journal-entry creation button now checks CREATE_PROVISIONJOURNALENTRIES.

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

Change: Bug fix

Suggested reviewers: adamsaghy, rhopman

Merge Risk: Minimal · previous review a745d

This change updates the permission names that control the Provisioning Entries menu and its buttons. No concrete defect has been established, so it looks safe to merge. The one open question is whether the journal-entries checkbox on the create form should require its own permission, and that is enforced by the server.

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 main change: switching the Provisioning Entries permission checks to Fineract's permission codes. The raw summary confirms the menu, create, submit, and journal-entry permission ch…
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 main change: switching the Provisioning Entries permission checks to Fineract's permission codes. The raw summary confirms the menu, create, submit, and journal-entry permission checks all change to the codes named in the title. The title is specific and matches the changeset, so it passes.

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: 82ace09c-f9a8-42ec-b1ac-a20fd3a34403
Commits

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

Files selected for processing: 4

  • src/app/accounting/accounting.component.html
  • src/app/accounting/provisioning-entries/create-provisioning-entry/create-provisioning-entry.component.html
  • src/app/accounting/provisioning-entries/provisioning-entries.component.html
  • src/app/accounting/provisioning-entries/view-provisioning-entry/view-provisioning-entry.component.html

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

@IOhacker
IOhacker merged commit 2b8e3c0 into openMF:dev Dec 1, 2026
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