Restricted administration rights
by IT-Projects LLC https://twitter.com/OdooFree , Ivan Yelizariev https://twitter.com/OdooFreeIncluded Dependencies | Show |
Lines of code | 202 |
Technical Name |
access_restricted |
Website | https://twitter.com/OdooFree |
Also available in version | v 10.0 v 12.0 v 11.0 v 13.0 v 8.0 v 9.0 |

Restricted administration rights
The module makes impossible for administrator to set (and see) more access rights (groups) than he already has. The only partial exception of this rule is made if you are already a member of the 'Allow add implied groups from settings' security group. Then you are allowed to escalate your privileges but just from Settings menus (by means of group_XXX boolean fields of res.config.settings models views).
This doesn't affect superuser, of course.
Typical usage of the module.
The superuser creates an administrator user without access group "Show Apps Menu" (see access_apps module). Then the administrator has access to settings, but not able to install new apps (without this module he can add himself to "Show Apps Menu" and get access to apps).
Tested on Odoo 14.0
Restricted administration rights
Installation
- Install this module in a usual way
Configuration
- By default all users except a superuser restricted to escalate the privileges
- There is only one configuration option this module provides. Under superuser open menu [[ Settings ]] >> Users & Companies >> Users
- In Access Rights tab you can select 'Allow add implied groups from settings' - to allow some users to configure modules by means of group_XXX fields from Settings menus
Usage
Let's take Sales (sale_management) module as an example.
Without this module installed:
- Say you have a user with administration rights Administration: Access Rights. This user thus may increase his own rights in Application Accesses from Sales: User: Own Documents Only to Sales: Administrator. Also he can open menu [[ Sales ]] >> Configuration >> Settings and select Customer Addresses there and then click [Apply] button (adding group_sale_delivery_address)
With this module installed:
- The user from previous example cannot increase his privileges. There is no Sales: Manager option for him, and also no Customer Addresses option in module configuration
- The only exception is done for users who are in special group 'Allow add implied groups from settings' - if your user is included in this group by the superuser then you may select Customer Addresses from Sale module Configuration >> Settings menu
Please log in to comment on this module