From 0b52b1622feaf4f5f40aa2c17768dd272cf2e446 Mon Sep 17 00:00:00 2001 From: evazion Date: Mon, 13 Jul 2020 18:19:20 -0500 Subject: [PATCH] posts: bring back uploader names. --- app/policies/post_policy.rb | 4 ---- app/views/comments/partials/index/_header.html.erb | 10 ++++------ app/views/posts/partials/show/_information.html.erb | 10 ++++------ app/views/posts/show.html+tooltip.erb | 4 +--- 4 files changed, 9 insertions(+), 19 deletions(-) diff --git a/app/policies/post_policy.rb b/app/policies/post_policy.rb index 3e347776c..413ce7876 100644 --- a/app/policies/post_policy.rb +++ b/app/policies/post_policy.rb @@ -47,10 +47,6 @@ class PostPolicy < ApplicationPolicy record.visible?(user) end - def can_view_uploader? - user.is_approver? - end - def can_lock_rating? user.is_builder? end diff --git a/app/views/comments/partials/index/_header.html.erb b/app/views/comments/partials/index/_header.html.erb index 86211bf0b..da2bb9463 100644 --- a/app/views/comments/partials/index/_header.html.erb +++ b/app/views/comments/partials/index/_header.html.erb @@ -4,12 +4,10 @@ Date <%= compact_time(post.created_at) %> - <% if policy(post).can_view_uploader? %> - - User - <%= link_to_user(post.uploader) %> - - <% end %> + + Uploader + <%= link_to_user(post.uploader) %> + Rating <%= post.pretty_rating %> diff --git a/app/views/posts/partials/show/_information.html.erb b/app/views/posts/partials/show/_information.html.erb index d38697558..4e6dae192 100644 --- a/app/views/posts/partials/show/_information.html.erb +++ b/app/views/posts/partials/show/_information.html.erb @@ -1,11 +1,9 @@