mirror of
https://github.com/docusealco/docuseal
synced 2026-11-04 14:42:32 -05:00
adjust cancan permissions
This commit is contained in:
1 parent
18bb57aa99
commit
b8fd5a77d4
18 files changed
+90
-71
No files matched your search
+9
-2
@@ -43,12 +43,19 @@ module Accounts
|
||||
new_template
|
||||
end
|
||||
|
||||
def load_webhook_configs(account)
|
||||
account = Account.order(:id).first unless Docuseal.multitenant?
|
||||
|
||||
account.encrypted_configs.find_by(key: EncryptedConfig::WEBHOOK_URL_KEY)
|
||||
end
|
||||
|
||||
def load_signing_pkcs(account)
|
||||
cert_data =
|
||||
if Docuseal.multitenant?
|
||||
Docuseal::CERTS
|
||||
EncryptedConfig.find_by(account:, key: EncryptedConfig::ESIGN_CERTS_KEY)&.value || Docuseal::CERTS
|
||||
else
|
||||
EncryptedConfig.find_by(account:, key: EncryptedConfig::ESIGN_CERTS_KEY).value
|
||||
EncryptedConfig.find_by(account: Account.order(:id).first,
|
||||
key: EncryptedConfig::ESIGN_CERTS_KEY).value
|
||||
end
|
||||
|
||||
if (default_cert = cert_data['custom']&.find { |e| e['status'] == 'default' })
|
||||
|
||||
Reference in new issue
Block a user