[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:
Florent de Labarre
2018-02-27 18:02:58 +01:00
committed by Martin Trigaux
parent a206cca404
commit 6c044b3675
+1
View File
@@ -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