Group backend
base_group_backend · OCA/server-backend
-
Security25/25No findings
-
Activity25/25Last human commit 6 months ago
-
Required by5/250 modules depend on it
-
Maturity12/25In 2 Odoo series since 16.0
Heuristic over the facts below, not an audit · How it's computed
Description
This module adds two "Backend User" groups (group_backend and
group_backend_ui_users) with restricted access to odoo backend only
(/web), with less and more controlled access than the native "Internal
User" group.
The problem with the "Internal User" group (
base.group_user) is that it can be used by any new module added to your project, so you don't control clearly this group's accesses.
The UI access is provided only for group_backend_ui_users :
-
minimal default access rules to access the user's own data:
- users and partners
- mail activity, notification and channel
- presence
-
minimal default menu to restrict the available ones:
- notification
- activities
Here is an example where a user from group_backend_ui_users can only
access and use the Dummy App. No other application is available to this
user (you may define your own application instead of the Dummy one).

We suggest to use this module with its companion base_user_role.
Limitations
At the time of writing, Odoo uses user.share == False and
user.has_group("base.group_user") == True to give the backend access
to user.
So technically, the module does 2 things :
- It sets the
shareparameter toFalseforgroup_backendusers. - It hijacks the
has_groupmethod of res.users by returningTrueforgroup_backendusers when the requested group isbase.group_user
This avoids to write a lot of overwrite in different controllers from
different modules ('portal', 'web', 'base', 'website') with hard coded
statements that check if user is part of the base.group_user or
share == False group.
Dependencies
- Odoo dependencies
- Python dependencies
- None
- System dependencies
- None
- Required by
- None
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 1
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
backend_dummy_model_tree_view |
Backend dummy list view | backend.dummy.model | list | New |
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 3
-
date_startDatetimedefault=fields.Datetime.nowname='Date start'required=True -
date_stopDatetimedefault=fields.Datetime.nowname='Date stop'required=True -
my_other_valueCharname='Other value'required=True -
my_valueCharname='Value'required=True
No public methods.
No new fields.
Public methods (1)-
get_user_roots(self)@api.model@api.returns('self')Avoid to display root menus with no defined groups_id to Backend UI Users like 'spreadsheet_dashboard.spreadsheet_dashboard_menu_root' or 'base.menu_management'.
No new fields.
Public methods (0)No public methods.
Loading…
Loading…