Skip to content

[18.0] [MIG] base_duplicate_security_group#1288

Open
jorgevalmalanetkia wants to merge 12 commits into
OCA:18.0from
jorgevalmalanetkia:18.0-mig-base_duplicate_security_group
Open

[18.0] [MIG] base_duplicate_security_group#1288
jorgevalmalanetkia wants to merge 12 commits into
OCA:18.0from
jorgevalmalanetkia:18.0-mig-base_duplicate_security_group

Conversation

@jorgevalmalanetkia

@jorgevalmalanetkia jorgevalmalanetkia commented Apr 30, 2026

Copy link
Copy Markdown
  • [IMP] List view support: Extended duplicate restriction to list views by patching ListController in addition to FormController, providing comprehensive duplicate control across both view types

chienandalu and others added 10 commits April 30, 2026 11:41
When the web_responsive module is installed, the tests fail when looking
for "Settings" in the menu, because you have to access the menu first
to get that option. Adding the extra step to display the menu is the
right option so that the tests don't fail whether the web_responsive
module is installed or not.

TT42816
@OCA-git-bot OCA-git-bot added mod:base_duplicate_security_group Module base_duplicate_security_group series:18.0 labels Apr 30, 2026
@jorgevalmalanetkia jorgevalmalanetkia force-pushed the 18.0-mig-base_duplicate_security_group branch 18 times, most recently from 05d6598 to baad0ae Compare May 3, 2026 11:45
@jorgevalmalanetkia jorgevalmalanetkia marked this pull request as ready for review May 3, 2026 11:54

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

LGTM, functional review.
Thanks!

"name": "Restrict records duplicating",
"summary": "Adds a security group to restrict which users can copy records",
"version": "15.0.1.0.1",
"version": "18.0.1.0.1",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

"version": "18.0.1.0.0",

- Updated manifest version to 18.0.1.0.1
- Migrated JavaScript to OWL 2.x framework
- Updated FormView.include() to patch(FormController.prototype)
- Updated imports: web.FormView → @web/views/form/form_controller
- Updated imports: web.session → @web/core/user
- Migrated tour.register() to registry.category('web_tour.tours')
- Updated tour steps to function: steps: () => [...]
- Added explicit 'run' property in tour steps

Breaking changes applied:
- OWL 1.x → OWL 2.x lifecycle patterns
- Session service → User service
- Tour API modernization
@jorgevalmalanetkia jorgevalmalanetkia force-pushed the 18.0-mig-base_duplicate_security_group branch from baad0ae to 1c47cae Compare May 5, 2026 07:39
@CristianoMafraJunior

Copy link
Copy Markdown
Member

How does a new feature change the commit name from ADD to IMP?
1c47cae

…st view

The security group restriction was only applied to the form view duplicate
button, leaving a security gap: users without the "Duplicate" permission
could still duplicate records by selecting them in list view and using the
"Duplicate" action.

This patch extends the protection to list view by patching ListController
to disable the duplicate action for users without permission. Tours and
HttpCase tests verify both allowed and forbidden scenarios.

The refactoring extracts the permission check into a common disableDuplicate()
function to ensure consistency across both form and list views.
@jorgevalmalanetkia jorgevalmalanetkia force-pushed the 18.0-mig-base_duplicate_security_group branch from 1c47cae to 9144d81 Compare May 19, 2026 06:58
@jorgevalmalanetkia

Copy link
Copy Markdown
Author

@CristianoMafraJunior can you review again? Thanks in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:base_duplicate_security_group Module base_duplicate_security_group series:18.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants