Reset UserInfo.current_user_id bevor processing of postmaster filters.
This commit is contained in:
parent
fb25016c8e
commit
bb1907415b
1 changed files with 1 additions and 3 deletions
|
@ -346,6 +346,7 @@ retrns
|
||||||
mail = parse(msg)
|
mail = parse(msg)
|
||||||
|
|
||||||
# run postmaster pre filter
|
# run postmaster pre filter
|
||||||
|
UserInfo.current_user_id = 1
|
||||||
filters = {}
|
filters = {}
|
||||||
Setting.where(area: 'Postmaster::PreFilter').order(:name).each {|setting|
|
Setting.where(area: 'Postmaster::PreFilter').order(:name).each {|setting|
|
||||||
filters[setting.name] = Kernel.const_get(Setting.get(setting.name))
|
filters[setting.name] = Kernel.const_get(Setting.get(setting.name))
|
||||||
|
@ -370,9 +371,6 @@ retrns
|
||||||
# use transaction
|
# use transaction
|
||||||
ActiveRecord::Base.transaction do
|
ActiveRecord::Base.transaction do
|
||||||
|
|
||||||
# reset current_user
|
|
||||||
UserInfo.current_user_id = 1
|
|
||||||
|
|
||||||
# create sender if needed
|
# create sender if needed
|
||||||
sender_user_id = mail[ 'x-zammad-customer-id'.to_sym ]
|
sender_user_id = mail[ 'x-zammad-customer-id'.to_sym ]
|
||||||
if !sender_user_id
|
if !sender_user_id
|
||||||
|
|
Loading…
Reference in a new issue