diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb index 44d68de26..c58cd3f82 100644 --- a/app/controllers/attachments_controller.rb +++ b/app/controllers/attachments_controller.rb @@ -79,7 +79,7 @@ class AttachmentsController < ApplicationController else candown = @attachment.is_public == 1 end - if candown || User.current.admin? + if candown || User.current.admin? || User.current.id == @attachment.author_id @attachment.increment_download if stale?(:etag => @attachment.digest) diff --git a/app/views/messages/_project_show.html.erb b/app/views/messages/_project_show.html.erb index 3bc9b6943..ad91c72f8 100644 --- a/app/views/messages/_project_show.html.erb +++ b/app/views/messages/_project_show.html.erb @@ -156,10 +156,10 @@ :data => {:confirm => l(:text_are_you_sure)}, :title => l(:button_delete) ) if message.destroyable_by?(User.current) %> - + +