[FIX] base : prevent unallowed launch
Do not allow to trigger the cron manually (e.g. via RPC call) Closes #23157
This commit is contained in:
committed by
Martin Trigaux
parent
a206cca404
commit
6c044b3675
@@ -71,6 +71,7 @@ class ir_cron(models.Model):
|
||||
|
||||
@api.multi
|
||||
def method_direct_trigger(self):
|
||||
self.check_access_rights('write')
|
||||
for cron in self:
|
||||
self.sudo(user=cron.user_id.id).ir_actions_server_id.run()
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user