Skip to content
Health
67/100
fair
  • Security25/25
    No findings
  • Activity25/25
    Last human commit 6 months ago
  • Required by5/25
    0 modules depend on it
  • Maturity12/25
    In 2 Odoo series since 16.0

Heuristic over the facts below, not an audit · How it's computed

Security findings
Grave / minor (static analysis)
Required by
0
Modules depending on it
External deps
0 pip · 0 bin
Python packages / system binaries
License
LGPL-3
No conflicts with its dependencies
Folder size
0.14 MB
Module directory on disk
Code analysis 0 migration notes 3 models 1 view 0 HTTP endpoints

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).

dummy_app

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 share parameter to False for group_backend users.
  • It hijacks the has_group method of res.users by returning True for group_backend users when the requested group is base.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
odoo/odoo:
- web
- bus
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 IDNameModelTypeStatus
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

New fields (4)
  • date_start Datetime
    default=fields.Datetime.now name='Date start' required=True
  • date_stop Datetime
    default=fields.Datetime.now name='Date stop' required=True
  • my_other_value Char
    name='Other value' required=True
  • my_value Char
    name='Value' required=True
Public methods (0)

No public methods.

New fields (0)

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'.

New fields (0)

No new fields.

Public methods (0)

No public methods.

Loading…

Loading…