Skip to content

fix: PermsHelper + readonly module ui - #1494

Merged
didoda merged 10 commits into
bedita:masterfrom
didoda:fix/6.x/perms-helper
Oct 16, 2026
Merged

didoda merged 10 commits into
bedita:masterfrom
didoda:fix/6.x/perms-helper

Conversation

@didoda

@didoda didoda commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

This applies some changes in perms helper.

Strengthens module permission checks by consistently enforcing allowed HTTP methods, including for administrators, while preserving their bypass of folder-role restrictions. Prevents stale permissions after helper reinitialization and denies checks when no object type is available. Also clears the default cache after saving API configuration and adds regression coverage for permission behavior and API failures.

Ui bonus: module box feedback for "readonly" mode: opaque background and "edit-off" icon, i.e.

image

@didoda didoda added this to the 6.x milestone Oct 14, 2026
@codecov

codecov Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.62%. Comparing base (b8a258a) to head (2627034).
⚠️ Report is 37 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #1494   +/-   ##
=========================================
  Coverage     99.62%   99.62%           
- Complexity     1567     1573    +6     
=========================================
  Files           105      105           
  Lines          6077     6102   +25     
=========================================
+ Hits           6054     6079   +25     
  Misses           23       23           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@didoda didoda changed the title fix: PermsHelper and more tests fix: PermsHelper + readonly module ui Oct 14, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Administrators can bypass missing-object-type denial, and readonly styling breaks with concurrent editors.

2 open findings
What changed in this PR

Strengthens permission enforcement, cache invalidation, and readonly module feedback.

Changes:

  • Enforces HTTP method and folder-role permissions consistently.
  • Adds readonly module styling and indicator.
  • Expands permission regression coverage.
File Description
src/​View/​Helper/​PermsHelper.php Tightens permission checks and resets state.
src/​View/​Helper/​LayoutHelper.php Adds readonly module classes.
src/​Utility/​ApiConfigTrait.php Clears default cache after saves.
src/​Controller/​TagsController.php Sets the tags current module.
templates/​Element/​Menu/​sidebar.twig Adds a readonly indicator.
templates/​Element/​Menu/​sidebar.scss Styles readonly module feedback.
tests/​TestCase/​View/​Helper/​PermsHelperTest.php Expands permission regression tests.
tests/​TestCase/​View/​Helper/​LayoutHelperTest.php Updates readonly class expectations.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/View/Helper/PermsHelper.php Outdated
Comment thread templates/Element/Menu/sidebar.scss
@didoda
didoda merged commit 021cb4f into bedita:master Oct 16, 2026
13 checks passed
@didoda
didoda deleted the fix/6.x/perms-helper branch October 16, 2026 05:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants