# Category overview - topics without permission are hidden, not replaced

**URL:** https://meta.discourse.org/t/category-overview-topics-without-permission-are-hidden-not-replaced/30264
**Category:** Bug
**Created:** [2015年六月21日 01:41 UTC](https://meta.discourse.org/t/category-overview-topics-without-permission-are-hidden-not-replaced/30264 "2015-06-21T01:41:48Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![AstonJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/astonj/32/215041_2.png) [@AstonJ](https://meta.discourse.org/u/AstonJ)
#### Post date: [2015年六月21日 01:41 UTC](https://meta.discourse.org/t/category-overview-topics-without-permission-are-hidden-not-replaced/30264/1 "2015-06-21T01:41:48Z")

</div>

If a user can’t view a sub-category and the latest topics are in the sub-category, the main category shows a blank space where the topics should appear.

 ![](https://global.discourse-cdn.com/meta/original/3X/0/2/023bae7d4a37174757d4828901286dd6a72241d4.png) 

(The latest topics in the Ruby Chat section are in a private category - so everyone else sees a blank space as above.)

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2015年六月21日 01:45 UTC](https://meta.discourse.org/t/category-overview-topics-without-permission-are-hidden-not-replaced/30264/2 "2015-06-21T01:45:05Z")

</div>

Er, yes and..? This is correct, the anon user can’t see topics they do not hold permissions to view.

---

<div class="post-metadata">

### Author: ![AstonJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/astonj/32/215041_2.png) [@AstonJ](https://meta.discourse.org/u/AstonJ)
#### Post date: [2015年六月21日 01:46 UTC](https://meta.discourse.org/t/category-overview-topics-without-permission-are-hidden-not-replaced/30264/3 "2015-06-21T01:46:41Z")

</div>

But the user looking at the page doesn’t care about that - he just wants to see the latest topics that are relevant to him.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2015年六月21日 01:47 UTC](https://meta.discourse.org/t/category-overview-topics-without-permission-are-hidden-not-replaced/30264/4 "2015-06-21T01:47:39Z")

</div>

Those topics are not relevant to him because he has no permissions to view them or know they exist.

---

<div class="post-metadata">

### Author: ![AstonJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/astonj/32/215041_2.png) [@AstonJ](https://meta.discourse.org/u/AstonJ)
#### Post date: [2015年六月21日 01:50 UTC](https://meta.discourse.org/t/category-overview-topics-without-permission-are-hidden-not-replaced/30264/5 "2015-06-21T01:50:27Z")

</div>

He’s not interested in seeing those topics - just the ones that _are_ relevant to him.

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [2015年六月21日 01:51 UTC](https://meta.discourse.org/t/category-overview-topics-without-permission-are-hidden-not-replaced/30264/6 "2015-06-21T01:51:14Z")

</div>

My take is AstonJ would like something like

Cat - user has perms  
Subcat - user does not have perms  
Subcat has 3 (or more) newer posts than the Cat does  
Instead of showing the user blank, show the recent posts from the Cat

Likely to need some fancy coding to do, but might be possible I guess

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2015年六月21日 01:51 UTC](https://meta.discourse.org/t/category-overview-topics-without-permission-are-hidden-not-replaced/30264/7 "2015-06-21T01:51:28Z")

</div>

I suspect this may be a caching thing,

EG: category A is visible B invisible … and cache is only built for anon, so a person who has visibility into sub category does not get to see the topics in categories view.

This feels to me like a bug, so recategorizing.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2015年六月21日 02:25 UTC](https://meta.discourse.org/t/category-overview-topics-without-permission-are-hidden-not-replaced/30264/8 "2015-06-21T02:25:31Z")

</div>

Category page cache is no longer built for anon as it reflects pin state, per recent @neil changes.

---

<div class="post-metadata">

### Author: ![neil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neil/32/102150_2.png) [@neil](https://meta.discourse.org/u/neil)
#### Post date: [2015年六月22日 17:49 UTC](https://meta.discourse.org/t/category-overview-topics-without-permission-are-hidden-not-replaced/30264/9 "2015-06-22T17:49:39Z")

</div>

> [@codinghorror](#):
>
> Category page cache is no longer built for anon as it reflects pin state, per recent @neil changes.

It was always being built [from an admin’s perspective](https://github.com/discourse/discourse/blob/master/app/models/category_featured_topic.rb#L22), even before my changes.

I think I can fix that for anons by adding 3 (or `category_featured_topics` setting) topics that anons can see to the end of the cache. If all others are filtered because of security, at least those will show.

---

<div class="post-metadata">

### Author: ![neil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neil/32/102150_2.png) [@neil](https://meta.discourse.org/u/neil)
#### Post date: [2015年九月21日 22:17 UTC](https://meta.discourse.org/t/category-overview-topics-without-permission-are-hidden-not-replaced/30264/10 "2015-09-21T22:17:54Z")

</div>

This bug has been fixed in time for 1.4.

👢  
🐛

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2015年九月21日 22:25 UTC](https://meta.discourse.org/t/category-overview-topics-without-permission-are-hidden-not-replaced/30264/11 "2015-09-21T22:25:35Z")

</div>


