refactor sign params

This commit is contained in:
Pete Matsyburka
2024-05-01 23:40:09 +03:00
parent 71319c1548
commit 99341e773f
6 changed files with 40 additions and 20 deletions
+5 -1
View File
@@ -90,7 +90,11 @@ module Accounts
def load_signing_pkcs(account)
cert_data =
if Docuseal.multitenant?
EncryptedConfig.find_by(account:, key: EncryptedConfig::ESIGN_CERTS_KEY)&.value || Docuseal::CERTS
data = EncryptedConfig.find_by(account:, key: EncryptedConfig::ESIGN_CERTS_KEY)&.value
return Docuseal.default_pkcs if data.blank?
data
else
EncryptedConfig.find_by(account:, key: EncryptedConfig::ESIGN_CERTS_KEY)&.value ||
EncryptedConfig.find_by(key: EncryptedConfig::ESIGN_CERTS_KEY).value