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
This commit is contained in:
1 parent
ba776f36a5
commit
828d444545
1 file changed
+2
-2
@@ -232,7 +232,7 @@ class Wizard(URLMixin, PoolBase):
|
||||
|
||||
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__,
|
||||
@@ -241,7 +241,7 @@ class Wizard(URLMixin, PoolBase):
|
||||
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
|
||||
|
||||
Reference in new issue
Block a user