Category Setting Banner continues to display on /categories

When a category setting restricts a user from creating a topic
and the category setting banner text is set to display a banner,
then the banner is displayed at the top of that category. :white_check_mark:
However, it also displays at the top of /categories if the user moves immediately there from the restricted category. :scream:
Steps to replicate:

  1. Create a category with security permissions restricting some set of users to “see”
    image

  2. Add text to the Banner text when a user cannot create a topic in this category field.

  3. Save the category settings.

  4. While logged in as a user who would be limited to read-only permissions for this category, browse to that category and view the banner.

  5. Now navigate immediately to /categories. You can do this either via the navigation menu or, in the case of our configuration, by clicking our community icon to return “home”, since our site is set to display categories by default. The banner remains in place, giving the impression the message applies to all categories.

3 Likes

Thanks for the detailed bug report! I just tested this on my local development site and am getting the same results as you. When navigating from a category page that displays the category read only banner to my site’s main category page, the banner is not removed from the categories page until I do a hard refresh on the page. This would be especially confusing for sites that have the categories page set as their homepage.

3 Likes

https://github.com/discourse/discourse/pull/11072

This is now fixed in the PR above. I will deploy it to your instance once it’s merged to the core.

5 Likes

The fix is now deployed to your site.

2 Likes

Thanks @vinothkannans, the banner vanishes from sight when I navigate back to /categories. :clap:

1 Like