Fix #4544: Show limited view of other user's uploads on the upload index.

* Show completed uploads to other users.
* Don't show failed or incomplete uploads to other users.
* Don't show tags to other users.
* Delete completed uploads after 1 hour.
* Delete incomplete uploads after 1 day.
* Delete failed uploads after 3 days.
This commit is contained in:
evazion
2020-07-13 18:58:40 -05:00
parent 85f464df83
commit ed79b623cc
6 changed files with 31 additions and 13 deletions

View File

@@ -44,10 +44,12 @@
<br>
<% end %>
<span class="info">
<strong>Tags</strong>
<%= TagSetPresenter.new(upload.tag_string.split).inline_tag_list_html %>
</span>
<% if policy(upload).can_view_tags? %>
<span class="info">
<strong>Tags</strong>
<%= TagSetPresenter.new(upload.tag_string.split).inline_tag_list_html %>
</span>
<% end %>
<% end %>
<% t.column "Uploader" do |upload| %>
<%= link_to_user upload.uploader %>

View File

@@ -5,7 +5,9 @@
<ul>
<li>Date: <%= @upload.created_at %></li>
<li>Source: <%= @upload.source %></li>
<li>Tags: <%= @upload.tag_string %></li>
<% if policy(@upload).can_view_tags? %>
<li>Tags: <%= @upload.tag_string %></li>
<% end %>
<% if @upload.md5.present? %>
<li>MD5: <%= @upload.md5 %>
<% end %>