修复资源上传人不能下载项目讨论区非公开资源的问题
This commit is contained in:
parent
80bd535b4f
commit
73537a30cb
|
@ -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)
|
||||
|
|
|
@ -156,10 +156,10 @@
|
|||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:title => l(:button_delete)
|
||||
) if message.destroyable_by?(User.current) %>
|
||||
</div></td>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td class="comments">
|
||||
<div class="wiki" style="width: 100%;word-break: break-all;">
|
||||
<%= textAreailizable message,:content,:attachments => message.attachments %>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20140814062455) do
|
||||
ActiveRecord::Schema.define(:version => 20140812065417) do
|
||||
|
||||
create_table "activities", :force => true do |t|
|
||||
t.integer "act_id", :null => false
|
||||
|
@ -449,7 +449,7 @@ ActiveRecord::Schema.define(:version => 20140814062455) do
|
|||
|
||||
create_table "forums", :force => true do |t|
|
||||
t.string "name", :null => false
|
||||
t.text "description"
|
||||
t.string "description", :default => ""
|
||||
t.integer "topic_count", :default => 0
|
||||
t.integer "memo_count", :default => 0
|
||||
t.integer "last_memo_id", :default => 0
|
||||
|
|
Loading…
Reference in New Issue