Skip to content

A platform for community discussion. Free, open, simple.

UX: Hide welcome topic from admins as well if not edited (#18807)

Blake Ericksonfefd93852058
diff --git a/lib/topic_query_params.rb b/lib/topic_query_params.rb
index 7081513c3f1..5c0175a8ba7 100644
--- a/lib/topic_query_params.rb
+++ b/lib/topic_query_params.rb
@@ -30,7 +30,6 @@ module TopicQueryParams
def hide_welcome_topic?
return false if !SiteSetting.bootstrap_mode_enabled
- return false if @guardian.is_admin?
Site.welcome_topic_exists_and_is_not_edited?
end
end
diff --git a/spec/requests/list_controller_spec.rb b/spec/requests/list_controller_spec.rb
index 7b08772566e..60ea55c524a 100644
--- a/spec/requests/list_controller_spec.rb
+++ b/spec/requests/list_controller_spec.rb
@@ -1003,14 +1003,14 @@ RSpec.describe ListController do
expect(parsed["topic_list"]["topics"].first["id"]).to eq(welcome_topic.id)
end
- it "is shown to admins" do
+ it "is hidden to admins" do
sign_in(admin)
get "/latest.json"
expect(response.status).to eq(200)
parsed = response.parsed_body
- expect(parsed["topic_list"]["topics"].length).to eq(2)
- expect(parsed["topic_list"]["topics"].first["id"]).to eq(welcome_topic.id)
+ expect(parsed["topic_list"]["topics"].length).to eq(1)
+ expect(parsed["topic_list"]["topics"].first["id"]).not_to eq(welcome_topic.id)
end
it "is shown to users when bootstrap mode is disabled" do