diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 2cb5c18b19b..7540e8fd6d8 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -6181,6 +6181,10 @@ abstract class CommonObject $setsharekey = true; } } + if (!empty($this->TRIGGER_PREFIX) && getDolGlobalInt(strtoupper($this->TRIGGER_PREFIX."_ALLOW_EXTERNAL_DOWNLOAD"))) { + $setsharekey = true; + } + // TODO Remove case covered by trigger prefix if ($this->element == 'commande' && getDolGlobalInt("ORDER_ALLOW_EXTERNAL_DOWNLOAD")) { $setsharekey = true; }