additional checks on forum topic visibility

This commit is contained in:
Albert Yi
2016-11-04 16:24:54 -07:00
parent a22a7c3302
commit eb6746a8a8
9 changed files with 35 additions and 11 deletions

View File

@@ -1,4 +1,4 @@
<% if CurrentUser.is_moderator? || !forum_post.is_deleted? %>
<% if forum_post.visible?(CurrentUser.user) %>
<article class="forum-post" id="forum_post_<%= forum_post.id %>" data-forum-post-id="<%= forum_post.id %>" data-creator="<%= forum_post.creator.name %>">
<div class="author">
<h4>

View File

@@ -3,7 +3,7 @@
<h1>
Topic: <%= @forum_topic.title %>
<% if @forum_topic.min_level >= User::Levels::BUILDER %>
<% if @forum_topic.min_level >= User::Levels::MODERATOR %>
<span class="level-topic">(<%= User.level_string(@forum_topic.min_level).downcase %>+ only)</span>
<% end %>