FIX: compatibility after allowlist rewording in Discourse
This commit is contained in:
parent
a3a8a2ff74
commit
f18cc21793
|
@ -200,7 +200,14 @@ after_initialize do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
whitelist_staff_user_custom_field(COUNT_FIELD)
|
|
||||||
|
# TODO Drop after Discourse 2.6.0 release
|
||||||
|
if respond_to?(:whitelist_staff_user_custom_field)
|
||||||
|
whitelist_staff_user_custom_field(COUNT_FIELD)
|
||||||
|
else
|
||||||
|
allow_staff_user_custom_field(COUNT_FIELD)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
add_to_class(Guardian, :can_delete_user_notes?) do
|
add_to_class(Guardian, :can_delete_user_notes?) do
|
||||||
(SiteSetting.user_notes_moderators_delete? && user.staff?) || user.admin?
|
(SiteSetting.user_notes_moderators_delete? && user.staff?) || user.admin?
|
||||||
|
|
Loading…
Reference in New Issue