diff options
| author | Yannick Tivisse <yti@odoo.com> | 2015-11-16 18:43:04 +0100 |
|---|---|---|
| committer | Yannick Tivisse <yti@odoo.com> | 2015-11-20 16:27:32 +0100 |
| commit | 1ecba213f4f188ba7a235e0cf4fc029535f0bdba (patch) | |
| tree | b14a6634ed228b54733253d32e4809e18f25b024 /addons/website/data | |
| parent | 8cd0127af300efd7f33bc45935912d75ca92f8b0 (diff) | |
[IMP] Newly created users get all manager access right
Coming from a bug in web_settings_dashboard. Invited user didn't have any rights
when created from the dashboard, which was leading to an error.
This bug leaded to a new discussion. Better to have basic employee having user
rights for all main applications. For bigger entreprises there is an admin that
will carefully remove extra rights, if necessary. The target is small businesses,
it makes sense that every way to create a user gives the same result.
In conclusion, each new user has a full access to the applications by default
How is it implemented ?
We added an inactive default user which original access right to the groups
'base.group_user' and 'base.group_partner_manager' in base. Each
application will extend the default user's access right by adding the maximal
access right for this application.
On user creation, we will use by default the 'group_id' field from the default
user. We will in the same time remove the ugly 'default_groups_ref' key which
was passed sometimes in the context for some fields in some views, and sometimes
nothing.
So, the user can modify the access rights for the default user, but he should be
aware that removing project user access rights for a default user will prevent
a *created on the fly in a task* user will not be able to access the task.
Diffstat (limited to 'addons/website/data')
| -rw-r--r-- | addons/website/data/data.xml | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/addons/website/data/data.xml b/addons/website/data/data.xml index f30068b72e9..98db6fe9cba 100644 --- a/addons/website/data/data.xml +++ b/addons/website/data/data.xml @@ -43,6 +43,10 @@ <field name="category_id" ref="base.module_category_website"/> </record> + <record id="base.default_user" model="res.users"> + <field name="groups_id" eval="[(4,ref('base.group_website_designer'))]"/> + </record> + <record id="action_module_website" model="ir.actions.act_window"> <field name="name">Website Apps</field> <field name="res_model">ir.module.module</field> |
