mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-28 11:14:24 +08:00
Fix permission helpers in delayed export job [SCI-2834]
This commit is contained in:
parent
2b4ef619c2
commit
daaeb385bb
1 changed files with 1 additions and 0 deletions
|
@ -225,6 +225,7 @@ class Project < ApplicationRecord
|
||||||
def generate_report_pdf(user, team, pdf_name, obj_filenames = nil)
|
def generate_report_pdf(user, team, pdf_name, obj_filenames = nil)
|
||||||
ActionController::Renderer::RACK_KEY_TRANSLATION['warden'] ||= 'warden'
|
ActionController::Renderer::RACK_KEY_TRANSLATION['warden'] ||= 'warden'
|
||||||
proxy = Warden::Proxy.new({}, Warden::Manager.new({}))
|
proxy = Warden::Proxy.new({}, Warden::Manager.new({}))
|
||||||
|
proxy.set_user(user, scope: :user, store: false)
|
||||||
renderer = ApplicationController.renderer.new(warden: proxy)
|
renderer = ApplicationController.renderer.new(warden: proxy)
|
||||||
|
|
||||||
report = Report.generate_whole_project_report(self, user, team)
|
report = Report.generate_whole_project_report(self, user, team)
|
||||||
|
|
Loading…
Reference in a new issue