Repository navigation
fix: PermsHelper + readonly module ui - #1494
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🟡 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.
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.

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.