Merged ajax_upload branch (#3957).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10977 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2012-12-10 20:09:41 +00:00
parent 2304f5d42c
commit ef25210aca
22 changed files with 442 additions and 83 deletions
+10
View File
@@ -300,6 +300,16 @@ class ApplicationController < ActionController::Base
render_404
end
def find_attachments
if (attachments = params[:attachments]).present?
att = attachments.values.collect do |attachment|
Attachment.find_by_token( attachment[:token] ) if attachment[:token].present?
end
att.compact!
end
@attachments = att || []
end
# make sure that the user is a member of the project (or admin) if project is private
# used as a before_filter for actions that do not require any particular permission on the project
def check_project_privacy