add more case to set share key

This commit is contained in:
Frédéric FRANCE
2025-12-19 10:37:52 +01:00
parent e24e7c4713
commit 36d982682d

View File

@@ -6173,6 +6173,10 @@ abstract class CommonObject
// Set the public "share" key
$setsharekey = false;
if (!empty($this->TRIGGER_PREFIX) && (getDolGlobalInt($this->TRIGGER_PREFIX."_ALLOW_EXTERNAL_DOWNLOAD") || getDolGlobalInt($this->TRIGGER_PREFIX."_ALLOW_ONLINESIGN"))) {
$setsharekey = true;
}
// TODO Remove case covered by trigger prefix
if ($this->element == 'propal' || $this->element == 'proposal') {
if (getDolGlobalInt("PROPOSAL_ALLOW_ONLINESIGN")) {
$setsharekey = true; // feature to make online signature is not set or set to on (default)
@@ -6181,10 +6185,6 @@ abstract class CommonObject
$setsharekey = true;
}
}
if (!empty($this->TRIGGER_PREFIX) && getDolGlobalInt($this->TRIGGER_PREFIX."_ALLOW_EXTERNAL_DOWNLOAD")) {
$setsharekey = true;
}
// TODO Remove case covered by trigger prefix
if ($this->element == 'facture' && getDolGlobalInt("INVOICE_ALLOW_EXTERNAL_DOWNLOAD")) {
$setsharekey = true;
}