FIX: Disable 'Create Topic' button if tag is staff-only. (#6984)

* FIX: Disable 'Create Topic' button if tag is staff-only.

* FIX: Staff-only tags should always return 404.
This commit is contained in:
Bianca Nenciu
2019-03-12 10:23:36 +02:00
committed by Sam
parent 191e31dccf
commit e6c2faf186
9 changed files with 169 additions and 12 deletions

View File

@@ -98,6 +98,8 @@ class TagsController < ::ApplicationController
end
def show
raise Discourse::NotFound if DiscourseTagging.hidden_tag_names(guardian).include?(params[:tag_id])
show_latest
end