mirror of
https://github.com/discourse/discourse-signatures.git
synced 2025-12-12 01:45:34 +00:00
FIX: compatibility after allowlist rewording in Discourse
This commit is contained in:
parent
2d45cbb95f
commit
01765454b2
11
plugin.rb
11
plugin.rb
@ -19,8 +19,15 @@ after_initialize do
|
|||||||
User.register_custom_field_type('signature_raw', :text)
|
User.register_custom_field_type('signature_raw', :text)
|
||||||
|
|
||||||
register_editable_user_custom_field [:see_signatures, :signature_url, :signature_raw]
|
register_editable_user_custom_field [:see_signatures, :signature_url, :signature_raw]
|
||||||
whitelist_public_user_custom_field :signature_cooked
|
|
||||||
whitelist_public_user_custom_field :signature_url
|
# TODO Drop after Discourse 2.6.0 release
|
||||||
|
if respond_to?(:whitelist_public_user_custom_field)
|
||||||
|
whitelist_public_user_custom_field :signature_cooked
|
||||||
|
whitelist_public_user_custom_field :signature_url
|
||||||
|
else
|
||||||
|
allow_public_user_custom_field :signature_cooked
|
||||||
|
allow_public_user_custom_field :signature_url
|
||||||
|
end
|
||||||
|
|
||||||
add_to_serializer(:post, :user_signature) {
|
add_to_serializer(:post, :user_signature) {
|
||||||
if SiteSetting.signatures_advanced_mode then
|
if SiteSetting.signatures_advanced_mode then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user