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.gjsindex 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.rbindex 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 doit "shows banner without background image" dosign_in(current_user)- visit "/admin/config/interface"+ visit "/"expect(banner).to be_visibleexpect(banner).to have_no_bg_imgend@@ -163,7 +163,7 @@ describe "Welcome banner", type: :system doSiteSetting.welcome_banner_image = bg_imgsign_in(current_user)- visit "/admin/config/interface"+ visit "/"expect(banner).to have_bg_img(bg_img.url)endend@@ -231,6 +231,12 @@ describe "Welcome banner", type: :system dovisit "/admin"expect(banner).to be_hidden++ visit "/admin/config/site-admin"+ expect(banner).to be_hidden++ visit "/admin/customize"+ expect(banner).to be_hiddenendend