FIX: check if allow_staff_user_custom_field exisits

This commit is contained in:
Krzysztof Kotlarek 2020-07-27 11:55:02 +10:00
parent 2f5dfebcdb
commit 2f34ae5778
1 changed files with 3 additions and 3 deletions

View File

@ -201,10 +201,10 @@ after_initialize do
end
# TODO Drop after Discourse 2.6.0 release
if respond_to?(:whitelist_staff_user_custom_field)
whitelist_staff_user_custom_field(COUNT_FIELD)
else
if respond_to?(:allow_staff_user_custom_field)
allow_staff_user_custom_field(COUNT_FIELD)
else
whitelist_staff_user_custom_field(COUNT_FIELD)
end
add_to_class(Guardian, :can_delete_user_notes?) do