mirror of
https://github.com/redmine/redmine.git
synced 2025-11-02 03:15:57 +01:00
Anonymous users can now be allowed to create, edit, comment issues, comment news and post messages in the forums.
These permissions need to be explicitly given to the Anonymous role (Admin -> Roles & Permissions -> Anonymous). git-svn-id: http://redmine.rubyforge.org/svn/trunk@919 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -49,7 +49,7 @@ class DocumentsController < ApplicationController
|
||||
@attachments = []
|
||||
params[:attachments].each { |file|
|
||||
next unless file.size > 0
|
||||
a = Attachment.create(:container => @document, :file => file, :author => logged_in_user)
|
||||
a = Attachment.create(:container => @document, :file => file, :author => User.current)
|
||||
@attachments << a unless a.new_record?
|
||||
} if params[:attachments] and params[:attachments].is_a? Array
|
||||
Mailer.deliver_attachments_added(@attachments) if !@attachments.empty? && Setting.notified_events.include?('document_added')
|
||||
|
||||
Reference in New Issue
Block a user