changeset dc923f35536d in trytond:5.4
details: https://hg.tryton.org/trytond?cmd=changeset;node=dc923f35536d
description:
Skip check access on ir.ui.menu for wizard
User launching a wizard from menu should not need write access on the
menu.
issue9173
review301161002
(grafted from c9b0bdd34b75bd5f6504d202ea0dacefe571130b)
diffstat:
trytond/wizard/wizard.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (21 lines):
diff -r 980363addee9 -r dc923f35536d trytond/wizard/wizard.py
--- a/trytond/wizard/wizard.py Tue Mar 24 10:02:58 2020 +0100
+++ b/trytond/wizard/wizard.py Thu Mar 26 00:12:43 2020 +0100
@@ -227,7 +227,7 @@
with Transaction().set_context(_check_access=True):
model = context.get('active_model')
- if model:
+ if model and model != 'ir.ui.menu':
ModelAccess.check(model, 'read')
groups = set(User.get_groups())
wizard_groups = ActionWizard.get_groups(cls.__name__,
@@ -236,7 +236,7 @@
if not groups & wizard_groups:
raise UserError('Calling wizard %s is not allowed!'
% cls.__name__)
- elif model:
+ elif model and model != 'ir.ui.menu':
ModelAccess.check(model, 'write')
@classmethod