From bb1907415b668655dcf3b67408f9a397dc93f432 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Tue, 12 Apr 2016 17:21:48 +0200 Subject: [PATCH] Reset UserInfo.current_user_id bevor processing of postmaster filters. --- app/models/channel/email_parser.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/models/channel/email_parser.rb b/app/models/channel/email_parser.rb index 0ae5bc9bc..6ee7d83ba 100644 --- a/app/models/channel/email_parser.rb +++ b/app/models/channel/email_parser.rb @@ -346,6 +346,7 @@ retrns mail = parse(msg) # run postmaster pre filter + UserInfo.current_user_id = 1 filters = {} Setting.where(area: 'Postmaster::PreFilter').order(:name).each {|setting| filters[setting.name] = Kernel.const_get(Setting.get(setting.name)) @@ -370,9 +371,6 @@ retrns # use transaction ActiveRecord::Base.transaction do - # reset current_user - UserInfo.current_user_id = 1 - # create sender if needed sender_user_id = mail[ 'x-zammad-customer-id'.to_sym ] if !sender_user_id