Skip to content

Commit 9df40da

Browse files
mentalkoilya ilchenko
authored andcommitted
📖 update docs
1 parent 59fdebd commit 9df40da

File tree

4 files changed

+62
-20
lines changed

4 files changed

+62
-20
lines changed

access_restricted/README.rst

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,32 @@
22
:alt: Tested and maintained by IT Projects Labs
33
:target: https://itpp.dev
44

5+
56
Restricted administration rights
67
================================
78

8-
The module makes impossible for administrator to set (and see) more access rights (groups) than he already has.
9-
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.
10-
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).
9+
The module hides from an **Internal User** all groups where he is not added to.
10+
So, he cannot add himself to any **groups**
11+
and cannot grants other users more access rights than he has himself.
12+
13+
This module adds a special group **'Allow add implied groups from settings'** whose users
14+
can grant other users more access rights by adding them to the same group.
15+
16+
Also using this module, you can restrict access to change some settings of the other modules (e.g. CRM, Sales etc.),
17+
because modules often make features optional by restricting them to users of certain groups.
1118

12-
This doesn't affect superuser, of course.
1319

1420
Typical usage of the module.
1521
----------------------------
1622

17-
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).
23+
This example requires **access_apps** module `be installed <https://apps.odoo.com/apps/modules/14.0/access_apps/>`_.
24+
25+
- The superuser creates an admin user without any ``Apps Access`` option in its settings. Then the admin has access to settings, but not able to install new apps.
26+
27+
28+
- Without this module, the admin can change the option to ``Apps access: Allow installing apps`` and get access to apps management.
29+
30+
31+
1832

1933
Tested on `Odoo 14.0 <https://github.com/odoo/odoo/commit/c16d4b5e7b9181c2c792f595a117de10510d45be>`_
171 KB
Loading

access_restricted/doc/index.rst

Lines changed: 43 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,58 @@
55
Installation
66
============
77

8-
* `Install <https://odoo-development.readthedocs.io/en/latest/odoo/usage/install-module.html>`__ this module in a usual way
8+
* `Install <https://odoo-development.readthedocs.io/en/latest/odoo/usage/install-module.html>`__ this module in a usual way.
99

1010
Configuration
1111
=============
1212

13-
* By default all users except a superuser restricted to escalate the privileges
14-
* There is only one configuration option this module provides. Under superuser open menu ``[[ Settings ]] >> Users & Companies >> Users``
15-
* In ``Access Rights`` tab you can select 'Allow add implied groups from settings' -
16-
to allow some users to configure modules by means of ``group_XXX`` fields from ``Settings`` menus
13+
**IMPORTANT NOTE:** After installing the module, only superuser can see all the groups without limitations.
1714

15+
This module allows certain users to configure modules from ``[[ Settings ]]``
16+
menu using boolean fields which ``Field`` value starts with a **group_**
17+
`(This info is displayed when hovering over the option name if developer tools is enabled)`
18+
19+
The only users who are in special group **'Allow add implied groups from settings'**
20+
have access to make changes in forbidden for others fields.
21+
22+
There is only one configuration option this module provides:
23+
24+
- Under superuser open ``[[ Settings ]] >> Users & Companies >> Users`` and select user's profile
25+
- In ``Access Rights`` tab activate 'Allow add implied groups from settings'
26+
27+
The user is then allowed to add additional access groups for himself
28+
by using the Boolean settings fields. `(res.config.settings models views)`
29+
1830
Usage
1931
=====
32+
Let's take an example of using this module and **Sales** module (sale_management).
33+
34+
**Without this module installed:**
35+
36+
Say you have a user with administration rights ``Administration: Access Rights``.
37+
This user thus may increase his own rights in ``Access Rights > Sales``
38+
from ``Sales: User: Own Documents Only`` to ``Sales: Administrator``.
39+
40+
Also he can open menu ``[[ Sales ]] >> Configuration >> Settings`` and
41+
select Customer Addresses (**group_** sale_delivery_address) there and then click ``[Apply]`` button
42+
43+
44+
**With this module installed:**
45+
46+
The example user cannot increase their privileges.
47+
There is no ``Sales: Administrator`` option for it and for this reason
48+
there are no module settings, including the
49+
``Client Addresses`` option.
50+
51+
============
2052

21-
Let's take ``Sales (sale_management)`` module as an example.
53+
To activate the ``Customer Addresses`` option, the user must be:
2254

23-
Without this module installed:
55+
- with administration rights ``Administration: Settings`` and also with ``Sales: Administrator`` rights
2456

25-
* 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``
26-
to ``Sales: Administrator``. Also he can open menu ``[[ Sales ]] >> Configuration >> Settings`` and select ``Customer Addresses`` there
27-
and then click ``[Apply]`` button (adding ``group_sale_delivery_address``)
57+
- is included in the **'Allow add implied groups from settings'** group.
2858

29-
With this module installed:
59+
The screenshot shows a user who is not included to 'Allow add implied groups from settings' group
60+
and therefore cannot activate the ``Customer Addresses`` option.
3061

31-
* The user from previous example cannot increase his privileges. There is no ``Sales: Manager`` option for him, and also no ``Customer Addresses``
32-
option in module configuration
33-
* 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
34-
``Customer Addresses`` from ``Sale`` module ``Configuration >> Settings`` menu
62+
.. image:: access_restricted_screenshot.png
171 KB
Loading

0 commit comments

Comments
 (0)