DEV: whiteList is deprecated (#186)

DEV: whiteList is deprecated (#186)

diff --git a/assets/javascripts/lib/discourse-markdown/discourse-calendar.js.es6 b/assets/javascripts/lib/discourse-markdown/discourse-calendar.js.es6
index 42fec16..28f06f9 100644
--- a/assets/javascripts/lib/discourse-markdown/discourse-calendar.js.es6
+++ b/assets/javascripts/lib/discourse-markdown/discourse-calendar.js.es6
@@ -85,7 +85,7 @@ function _renderTimezonePicker(state) {
 }
 
 export function setup(helper) {
-  helper.whiteList([
+  helper.allowList([
     "div.calendar",
     "div.discourse-calendar-header",
     "div.discourse-calendar-wrap",
diff --git a/assets/javascripts/lib/discourse-markdown/discourse-post-event-block.js.es6 b/assets/javascripts/lib/discourse-markdown/discourse-post-event-block.js.es6
index 1bc7a5f..1f7bd7d 100644
--- a/assets/javascripts/lib/discourse-markdown/discourse-post-event-block.js.es6
+++ b/assets/javascripts/lib/discourse-markdown/discourse-post-event-block.js.es6
@@ -27,7 +27,7 @@ function dasherize(input) {
 }
 
 export function setup(helper) {
-  helper.whiteList(["div.discourse-post-event"]);
+  helper.allowList(["div.discourse-post-event"]);
 
   helper.registerOptions((opts, siteSettings) => {
     opts.features.discourse_post_event =
diff --git a/plugin.rb b/plugin.rb
index a06c5b4..4edceb6 100644
--- a/plugin.rb
+++ b/plugin.rb
@@ -330,12 +330,7 @@ after_initialize do
 
   register_editable_user_custom_field(DiscourseCalendar::REGION_CUSTOM_FIELD)
 
-  # TODO Drop after Discourse 2.6.0 release
-  if respond_to?(:allow_staff_user_custom_field)
-    allow_staff_user_custom_field(DiscourseCalendar::REGION_CUSTOM_FIELD)
-  else
-    whitelist_staff_user_custom_field(DiscourseCalendar::REGION_CUSTOM_FIELD)
-  end
+  allow_staff_user_custom_field(DiscourseCalendar::REGION_CUSTOM_FIELD)
 
   on(:site_setting_changed) do |name, old_value, new_value|
     unless %i[all_day_event_start_time all_day_event_end_time].include? name

GitHub sha: 28e156d55df428fe9bc5cf88215a9ce4e254932c

This commit appears in #186 which was approved by davidtaylorhq. It was merged by jjaffeux.