FEATURE: Allow TL4 users to reset bump date

FEATURE: Allow TL4 users to reset bump date

diff --git a/app/assets/javascripts/discourse/widgets/topic-admin-menu.js.es6 b/app/assets/javascripts/discourse/widgets/topic-admin-menu.js.es6
index b029650..b73cdf5 100644
--- a/app/assets/javascripts/discourse/widgets/topic-admin-menu.js.es6
+++ b/app/assets/javascripts/discourse/widgets/topic-admin-menu.js.es6
@@ -211,15 +211,13 @@ export default createWidget("topic-admin-menu", {
       });
     }
 
-    if (this.currentUser.get("staff")) {
-      buttons.push({
-        className: "topic-admin-reset-bump-date",
-        buttonClass: "btn-default",
-        action: "resetBumpDate",
-        icon: "anchor",
-        label: "actions.reset_bump_date"
-      });
-    }
+    buttons.push({
+      className: "topic-admin-reset-bump-date",
+      buttonClass: "btn-default",
+      action: "resetBumpDate",
+      icon: "anchor",
+      label: "actions.reset_bump_date"
+    });
 
     if (!isPrivateMessage) {
       buttons.push({
diff --git a/lib/guardian/topic_guardian.rb b/lib/guardian/topic_guardian.rb
index 8a7fd9d..d11c877 100644
--- a/lib/guardian/topic_guardian.rb
+++ b/lib/guardian/topic_guardian.rb
@@ -148,6 +148,6 @@ module TopicGuardian
   end
 
   def can_update_bumped_at?
-    is_staff?
+    is_staff? || @user.has_trust_level?(TrustLevel[4])
   end
 end
diff --git a/spec/requests/topics_controller_spec.rb b/spec/requests/topics_controller_spec.rb
index f225b3c..c7851de 100644
--- a/spec/requests/topics_controller_spec.rb
+++ b/spec/requests/topics_controller_spec.rb
@@ -2620,7 +2620,7 @@ RSpec.describe TopicsController do
         expect(response.status).to eq(403)
       end
 
-      [:user, :trust_level_4].each do |user|
+      [:user].each do |user|
         it "denies access for #{user}" do
           sign_in(Fabricate(user))
           put "/t/#{topic.id}/reset-bump-date.json"
@@ -2635,7 +2635,7 @@ RSpec.describe TopicsController do
       end
     end
 
-    [:admin, :moderator].each do |user|
+    [:admin, :moderator, :trust_level_4].each do |user|
       it "should reset bumped_at as #{user}" do
         sign_in(Fabricate(user))
         topic = Fabricate(:topic, bumped_at: 1.hour.ago)

GitHub
sha: c3099612

This commit has been mentioned on Discourse Meta. There might be relevant details there: