Actions
Defect #6590
closedWrong file list link in email notification on new file upload
Start date:
2010-10-06
Due date:
% Done:
0%
Estimated time:
Resolution:
Fixed
Affected version:
Description
The link in the email pointing to the file list leads to a 403 error (You are not authorized to access this page.).
E.g. the file list link in the email is: http://host/redmine/projects/list_files/projectXY
(instead of http://host/redmine/projects/projectXY/files)
BR, Christian
Redmine version 1.0.2 stable Ruby version 1.8.7 (i386-mingw32) RubyGems version 1.3.7 Rack version 1.0 Rails version 2.3.5 Active Record version 2.3.5 Active Resource version 2.3.5 Action Mailer version 2.3.5 Active Support version 2.3.5 Action Pack version 2.3.5 Environment: production Database adapter mysql Database version MySQL 5.1.41 Database schema version 20100819172912 Windows 2003 X64 SP2 mongrel 1.1.5 mongrel_service 0.3.4 gem_plugin 0.2.3 cgi_multipart_eof_fix 2.5.0 win32-service 0.5.2 Plugins: Redmine Newissuealerts 0.0.2 Issue Resources 0.2.0 Redmine Graphs 0.1.0 Default columns 0.0.2
Files
Updated by Vladimir Ch almost 14 years ago
Same problem!
Redmine version 1.0.4 stable
Ruby version 1.8.7 (i386-mingw32)
Environment: production
Database adapter mysql
Database version MySQL 5.0.90
Updated by Vladimir Ch almost 14 years ago
- File redmine.png redmine.png added
In version 1.1 the error still persists.
PS: Windows 2003 Server
Updated by Sebastian Maj almost 14 years ago
Is there any chances that this problem will be fixed soon? It's really annoying.
Updated by Kseniya Shestakova almost 14 years ago
In app/models/mailer.rb
def attachments_added(attachments) container = attachments.first.container added_to = '' added_to_url = '' case container.class.name when 'Project' - added_to_url = url_for(:controller => 'projects', :action => 'list_files', :id => container) + added_to_url = url_for(:controller => 'files', :action => 'index', :project_id => container) added_to = "#{l(:label_project)}: #{container}" recipients container.project.notified_users.select {|user| user.allowed_to?(:view_files, container.project)}.collect {|u| u.mail} when 'Version' - added_to_url = url_for(:controller => 'projects', :action => 'list_files', :id => container) + added_to_url = url_for(:controller => 'files', :action => 'index', :project_id => container) added_to = "#{l(:label_version)}: #{container.name}" recipients container.project.notified_users.select {|user| user.allowed_to?(:view_files, container.project)}.collect {|u| u.mail} when 'Document' added_to_url = url_for(:controller => 'documents', :action => 'show', :id => container.id) added_to = "#{l(:label_document)}: #{container.title}" recipients container.recipients end redmine_headers 'Project' => container.project.identifier subject "[#{container.project.name}] #{l(:label_attachment_new)}" body :attachments => attachments, :added_to => added_to, :added_to_url => added_to_url render_multipart('attachments_added', body) end
Updated by Karel Pičman almost 14 years ago
In case of Version there should be container.project_id
when 'Version' - added_to_url = url_for(:controller => 'projects', :action => 'list_files', :id => container) + added_to_url = url_for(:controller => 'files', :action => 'index', :project_id => container.project_id) added_to = "#{l(:label_version)}: #{container.name}" recipients container.project.notified_users.select {|user| user.allowed_to?(:view_files, container.project)}.collect {|u| u.mail} when 'Document'
Updated by Etienne Massip almost 14 years ago
- Target version set to Candidate for next minor release
Updated by Karel Pičman almost 14 years ago
- File mailer.rb.patch mailer.rb.patch added
Here is a patch
Updated by Jean-Philippe Lang over 13 years ago
- Status changed from New to Resolved
- Target version changed from Candidate for next minor release to 1.1.3
- Resolution set to Fixed
Fixed in r5230, thanks.
Updated by Jean-Philippe Lang over 13 years ago
- Status changed from Resolved to Closed
Actions