diff --git a/app/models/project.rb b/app/models/project.rb index 16952fb2a..bcfe98e9c 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -225,6 +225,7 @@ class Project < ApplicationRecord def generate_report_pdf(user, team, pdf_name, obj_filenames = nil) ActionController::Renderer::RACK_KEY_TRANSLATION['warden'] ||= 'warden' proxy = Warden::Proxy.new({}, Warden::Manager.new({})) + proxy.set_user(user, scope: :user, store: false) renderer = ApplicationController.renderer.new(warden: proxy) report = Report.generate_whole_project_report(self, user, team)