In smartweb, only Manager can delete MessagesFolder (from collective.… - #24
In smartweb, only Manager can delete MessagesFolder (from collective.…#24boulch wants to merge 1 commit into
Conversation
📝 WalkthroughWalkthroughThis pull request introduces access control restrictions for MessagesConfig deletion by implementing a new workflow with permission mappings and an event-based subscriber that enforces Manager-only deletion rights. Changes span workflow definitions, configuration profiles, event handling, tests, and an upgrade path from version 1040 to 1041. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@CHANGES.rst`:
- Around line 8-9: The release note uses the wrong object name; update the
CHANGES.rst entry to reference MessagesConfig (the implemented and tested type)
instead of MessagesFolder so terminology matches the code and tests (change the
line "- In smartweb, only Manager can delete MessagesFolder (from
collective.messagesviewlet) [boulch]" to use "MessagesConfig"). Ensure any
surrounding context or other mentions in CHANGES.rst that refer to
MessagesFolder are also updated to MessagesConfig to avoid ambiguity.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 08f3f848-2e78-4676-8f0a-d1a85913c469
📒 Files selected for processing (12)
CHANGES.rstsrc/imio/smartweb/policy/profiles/default/metadata.xmlsrc/imio/smartweb/policy/profiles/default/workflows.xmlsrc/imio/smartweb/policy/profiles/default/workflows/messagesconfig_workflow/definition.xmlsrc/imio/smartweb/policy/profiles/testing/workflows.xmlsrc/imio/smartweb/policy/profiles/testing/workflows/messagesconfig_workflow/definition.xmlsrc/imio/smartweb/policy/subscribers.pysrc/imio/smartweb/policy/subscribers.zcmlsrc/imio/smartweb/policy/tests/test_messages_config_delete.pysrc/imio/smartweb/policy/upgrades/configure.zcmlsrc/imio/smartweb/policy/upgrades/profiles/1040_to_1041/workflows.xmlsrc/imio/smartweb/policy/upgrades/profiles/1040_to_1041/workflows/messagesconfig_workflow/definition.xml
| - In smartweb, only Manager can delete MessagesFolder (from collective.messagesviewlet) | ||
| [boulch] |
There was a problem hiding this comment.
Align release-note terminology with implemented object type.
The implementation and tests target MessagesConfig, while this entry says MessagesFolder. Using the same term avoids ambiguity for operators.
✏️ Proposed wording tweak
-- In smartweb, only Manager can delete MessagesFolder (from collective.messagesviewlet)
+- In smartweb, only Manager can delete MessagesConfig (from collective.messagesviewlet)📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - In smartweb, only Manager can delete MessagesFolder (from collective.messagesviewlet) | |
| [boulch] | |
| - In smartweb, only Manager can delete MessagesConfig (from collective.messagesviewlet) | |
| [boulch] |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@CHANGES.rst` around lines 8 - 9, The release note uses the wrong object name;
update the CHANGES.rst entry to reference MessagesConfig (the implemented and
tested type) instead of MessagesFolder so terminology matches the code and tests
(change the line "- In smartweb, only Manager can delete MessagesFolder (from
collective.messagesviewlet) [boulch]" to use "MessagesConfig"). Ensure any
surrounding context or other mentions in CHANGES.rst that refer to
MessagesFolder are also updated to MessagesConfig to avoid ambiguity.
…messagesviewlet)
Summary by CodeRabbit
New Features
Chores