FIX: Staff should be allowed to ignore users (#7216)

FIX: Staff should be allowed to ignore users (#7216)

diff --git a/lib/guardian.rb b/lib/guardian.rb
index 3bab77e..7bcc159 100644
--- a/lib/guardian.rb
+++ b/lib/guardian.rb
@@ -392,7 +392,7 @@ class Guardian
 
   def can_ignore_user?(user_id)
     @user.id != user_id &&
-      @user.trust_level >= TrustLevel.levels[:member] &&
+      (@user.staff? || @user.trust_level >= TrustLevel.levels[:member]) &&
       User.where(id: user_id, admin: false, moderator: false).exists?
   end
 
diff --git a/spec/components/guardian_spec.rb b/spec/components/guardian_spec.rb
index e0417a7..eb4008e 100644
--- a/spec/components/guardian_spec.rb
+++ b/spec/components/guardian_spec.rb
@@ -2675,6 +2675,15 @@ describe Guardian do
       end
     end
 
+    context "when ignorer is staff" do
+      let(:guardian) { Guardian.new(admin) }
+      let!(:another_user) { Fabricate(:user) }
+
+      it 'allows ignoring user' do
+        expect(guardian.can_ignore_user?(another_user.id)).to eq(true)
+      end
+    end
+
     context "when ignorer's trust level is tl2" do
       let(:guardian) { Guardian.new(trust_level_2) }
       let!(:another_user) { Fabricate(:user) }

GitHub sha: ed73cc60