refactor sign params

This commit is contained in:
Pete Matsyburka committed 2024-05-01 23:40:09 +03:00
1 parent 71319c1548
commit 99341e773f
6 files changed
+40 -20

No files matched your search

+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