Skip to content

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

FIX: Welcome banner: excludes all admin routes (#34822)

Yuriy Kurant2a5c811cc713
diff --git a/app/assets/javascripts/discourse/app/components/welcome-banner.gjs b/app/assets/javascripts/discourse/app/components/welcome-banner.gjs
index 7606823de0c..c85d1a70acc 100644
--- a/app/assets/javascripts/discourse/app/components/welcome-banner.gjs
+++ b/app/assets/javascripts/discourse/app/components/welcome-banner.gjs
@@ -74,7 +74,7 @@ export default class WelcomeBanner extends Component {
case "all_pages":
return (
currentRouteName !== "full-page-search" &&
- !currentRouteName.startsWith("admin.") &&
+ !currentRouteName.startsWith("admin") &&
!ALL_PAGES_EXCLUDED_ROUTES.some(
(routeName) => routeName === currentRouteName
)
diff --git a/spec/system/welcome_banner_spec.rb b/spec/system/welcome_banner_spec.rb
index 1e9206a204c..a2f5e9e52c1 100644
--- a/spec/system/welcome_banner_spec.rb
+++ b/spec/system/welcome_banner_spec.rb
@@ -154,7 +154,7 @@ describe "Welcome banner", type: :system do
it "shows banner without background image" do
sign_in(current_user)
- visit "/admin/config/interface"
+ visit "/"
expect(banner).to be_visible
expect(banner).to have_no_bg_img
end
@@ -163,7 +163,7 @@ describe "Welcome banner", type: :system do
SiteSetting.welcome_banner_image = bg_img
sign_in(current_user)
- visit "/admin/config/interface"
+ visit "/"
expect(banner).to have_bg_img(bg_img.url)
end
end
@@ -231,6 +231,12 @@ describe "Welcome banner", type: :system do
visit "/admin"
expect(banner).to be_hidden
+
+ visit "/admin/config/site-admin"
+ expect(banner).to be_hidden
+
+ visit "/admin/customize"
+ expect(banner).to be_hidden
end
end