fix: [modules] only run the workflow if it's enabled, fixes #8531

- blocked event report fetches from URL
pull/8537/head
iglocska 2022-08-11 14:59:59 +02:00
parent 0f15344cff
commit cbfb2b74ee
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
1 changed files with 4 additions and 1 deletions

View File

@ -213,7 +213,10 @@ class Module extends AppModel
'action' => 'execute_workflow',
'id' => 0,
];
if (empty($triggerData) && $this->Workflow->isTriggerCallable($trigger_id) && !empty($postData['attribute_uuid'])) {
if (!$this->Workflow->isTriggerCallable($trigger_id)) {
return true;
}
if (empty($triggerData) && !empty($postData['attribute_uuid'])) {
$this->User = ClassRegistry::init('User');
$this->Attribute = ClassRegistry::init('Attribute');
$user = $this->User->getAuthUser(Configure::read('CurrentUserId'), true);