[FIX] account, stock, website: access rights
1. Create a new user with all the permissions as manager (or at least
Accounting) except Inventory
2. Login and then go to Invoicing --> Settings
3. Do a minor change, save
An access error occurs.
Since the settings of all modules are smartly loaded in v11, it now
implies that a user must have extra manager access rights to be allowed
to save them. We could have kept separate actions for each setting page,
but we would have missed the fun of access errors.
Anyway, security-wise this is not an issue to force the manager groups
since a user with 'Settings' access rights can change his own rights.
It's just very annoying. Or fun.
Complement of aa65a46fc5
Fixes #21766
opw-801210
This commit is contained in:
committed by
Nicolas Martinelli
parent
4637bdf9bf
commit
81d1296323
@@ -23,6 +23,10 @@
|
||||
<field name="groups_id" eval="[(4, ref('account.group_account_invoice')), (4, ref('account.group_account_manager'))]"/>
|
||||
</record>
|
||||
|
||||
<record id="base.group_system" model="res.groups">
|
||||
<field name="implied_ids" eval="[(4, ref('account.group_account_manager'))]"/>
|
||||
</record>
|
||||
|
||||
<record id="group_warning_account" model="res.groups">
|
||||
<field name="name">A warning can be set on a partner (Account)</field>
|
||||
<field name="category_id" ref="base.module_category_hidden"/>
|
||||
|
||||
@@ -72,6 +72,8 @@ class ResConfigSettings(models.TransientModel):
|
||||
@api.multi
|
||||
def set_values(self):
|
||||
super(ResConfigSettings, self).set_values()
|
||||
if not self.user_has_groups('stock.group_stock_manager'):
|
||||
return
|
||||
self.env['ir.config_parameter'].sudo().set_param('stock.use_propagation_minimum_delta', self.use_propagation_minimum_delta)
|
||||
""" If we are not in multiple locations, we can deactivate the internal
|
||||
operation types of the warehouses, so they won't appear in the dashboard.
|
||||
|
||||
@@ -15,6 +15,10 @@
|
||||
<field name="groups_id" eval="[(4, ref('group_website_designer'))]"/>
|
||||
</record>
|
||||
|
||||
<record id="base.group_system" model="res.groups">
|
||||
<field name="implied_ids" eval="[(4, ref('website.group_website_designer'))]"/>
|
||||
</record>
|
||||
|
||||
<record id="website_designer_edit_qweb" model="ir.rule">
|
||||
<field name="name">website_designer: Manage Website and qWeb view</field>
|
||||
<field name="model_id" ref="base.model_ir_ui_view"/>
|
||||
|
||||
Reference in New Issue
Block a user