# 'New Topic' is active on staff-only tag pages

**URL:** https://meta.discourse.org/t/new-topic-is-active-on-staff-only-tag-pages/108237
**Category:** Bug
**Created:** [3 februari 2019 om 10:13 UTC](https://meta.discourse.org/t/new-topic-is-active-on-staff-only-tag-pages/108237 "2019-02-03T10:13:20Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![bartv](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bartv/32/130052_2.png) [@bartv](https://meta.discourse.org/u/bartv)
#### Post date: [3 februari 2019 om 10:13 UTC](https://meta.discourse.org/t/new-topic-is-active-on-staff-only-tag-pages/108237/1 "2019-02-03T10:13:20Z")

</div>

Users can create posts from staff-only tag pages (/tags/staff-only-tag). These go straight to moderation, but it seems it would be better to disable the new topic button on these pages.

---

<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: [3 februari 2019 om 10:17 UTC](https://meta.discourse.org/t/new-topic-is-active-on-staff-only-tag-pages/108237/2 "2019-02-03T10:17:39Z")

</div>

Hmm that does feel like a bug. @nbianca could you have a look next week?

---

<div class="post-metadata">

### Author: ![venarius](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/venarius/32/133142_2.png) [@venarius](https://meta.discourse.org/u/venarius)
#### Post date: [7 maart 2019 om 08:52 UTC](https://meta.discourse.org/t/new-topic-is-active-on-staff-only-tag-pages/108237/4 "2019-03-07T08:52:35Z")

</div>

Wouldn’t it be a better idea to just display a 404 if the user isn’t supposed to see the tag because its part of a “Staff Only” group?

Suggested change:

```plaintext
# app/controllers/tags_controller.rb

def show
  unless TagGroup.visible(guardian).pluck(:id)&.include? Tag.find_by_name(params[:tag_id]).tag_groups.pluck(:id)
    raise Discourse::NotFound
  end

  show_latest
end

```

Any opinion on this? I would create a PR and also write some tests 🙂

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [7 maart 2019 om 10:25 UTC](https://meta.discourse.org/t/new-topic-is-active-on-staff-only-tag-pages/108237/5 "2019-03-07T10:25:48Z")

</div>

Thanks for the help @venarius but @nbianca is already working on a fix.

---

<div class="post-metadata">

### Author: ![nbianca](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nbianca/32/157984_2.png) [@nbianca](https://meta.discourse.org/u/nbianca)
#### Post date: [7 maart 2019 om 11:18 UTC](https://meta.discourse.org/t/new-topic-is-active-on-staff-only-tag-pages/108237/6 "2019-03-07T11:18:09Z")

</div>

I have fixed both of the issues in this PR:

[https://github.com/discourse/discourse/pull/6984](https://github.com/discourse/discourse/pull/6984)

---

<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: [7 maart 2019 om 23:52 UTC](https://meta.discourse.org/t/new-topic-is-active-on-staff-only-tag-pages/108237/7 "2019-03-07T23:52:47Z")

</div>


