mirror of
https://github.com/docusealco/docuseal
synced 2026-11-06 06:52:33 -05:00
add default user signatures
This commit is contained in:
1 parent
380f553a17
commit
5643094a7a
22 files changed
+337
-59
No files matched your search
@@ -0,0 +1,13 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module UserConfigs
|
||||
module_function
|
||||
|
||||
def load_signature(user)
|
||||
return if user.blank?
|
||||
|
||||
uuid = user.user_configs.find_or_initialize_by(key: UserConfig::SIGNATURE_KEY).value
|
||||
|
||||
ActiveStorage::Attachment.find_by(uuid:, record: user, name: 'signature') if uuid.present?
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user