Overview
Odoo's stock portal lets contacts change their account details and addresses, and those writes run with elevated rights that ACLs cannot stop. This module intercepts the HTTP routes themselves and turns the writes into no-ops when the company setting is on, which is the default. Portal users keep only two writes: posting in the chatter and changing their own password. It protects master data, plugs into Portal and the passkey login, and gives the company a portal that customers can read but not alter.
Usage steps
- 1
Turn the lockdown on or off
In the general settings the administrator finds Lock Down Customer Portal, which is enabled by default per company. When enabled, every protection below is active. When disabled, the standard portal behaviour returns.
- Setting: Lock Down Customer Portal
- Per company
- Default is on
- 2
Block account detail edits
The /my/account route is overridden so a portal user cannot save changes to name, email or other partner fields. The submit becomes a no-op and the user is told the action is unavailable. Fields on the user record are also protected in the write method of res.users.
- Route /my/account intercepted
- Message: action not available on this portal
- Protected fields listed in the error
- 3
Block address create, edit and archive
The routes /my/addresses, /my/address, /my/address/submit and /my/address/archive are overridden. A portal user cannot add, edit or archive delivery or invoice addresses. The address pages are hidden from the portal layout.
- Addresses card hidden
- Submit and archive become no-ops
- Deactivate account also blocked
- 4
Hide edit links in the portal
Two view inheritances remove the Addresses card and the Edit Information link from the portal home. Users therefore do not see buttons that would do nothing. This keeps the portal clean and consistent with the locked routes.
- Hide Addresses card
- Hide Edit Information link
- Rendered only when lockdown is active
- 5
Keep password change only
The security page of the portal is reduced to a password-change form. Everything else on that page, such as devices and other sections, is removed. The user can still change their own password.
- Template: Password Change Only
- Revoke-all-devices action guarded
- Chatter posting remains allowed
- 6
Passkeys managed by the company
Creating, changing or deleting passkeys from the portal is refused with a message that passkeys are managed by the team. The check lives in create, write and unlink on the passkey model. Internal users are not affected.
- Applies to portal users only
- Checked in create, write and unlink
- Depends on the passkey login app
Screens
Illustrative mockups with placeholder data.
—
Added by this module
Roles
| Role |
|---|
| Portal user (restricted) |
| Administrator (settings) |
Dependencies
Want to know more or try this app? Contact us
We can arrange a demo or a trial and answer your questions about Portal Lockdown.
