From 81d751974d41a555169c86a56a85a8c0c290932f Mon Sep 17 00:00:00 2001 From: Oleksii Kriuchykhin Date: Mon, 22 Oct 2018 14:32:10 +0200 Subject: [PATCH] Fix helpers to use with export all [SCI-2793] --- app/helpers/application_helper.rb | 3 +-- app/helpers/tiny_mce_helper.rb | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index c54d255a9..e97f92b36 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -133,7 +133,6 @@ module ApplicationHelper match = el.match(sa_user) user = User.find_by_id(match[2].base62_decode) next unless user - team ||= current_team popover_for_user_name(user, team) end new_text @@ -166,7 +165,7 @@ module ApplicationHelper end user_name = user.full_name - + unless skip_user_status || user_still_in_team user_name << " #{I18n.t('atwho.res.removed')}" end diff --git a/app/helpers/tiny_mce_helper.rb b/app/helpers/tiny_mce_helper.rb index f35b7e005..091c586c1 100644 --- a/app/helpers/tiny_mce_helper.rb +++ b/app/helpers/tiny_mce_helper.rb @@ -24,8 +24,7 @@ module TinyMceHelper text.gsub(regex) do |el| match = el.match(regex) img = TinyMceAsset.find_by_id(match[1]) - next unless img && img.team == current_team - next unless check_image_permissions(obj, img) + next unless img && check_image_permissions(obj, img) if pdf_export_ready report_image_asset_url(img, :tiny_mce_asset, 'tiny-mce-pdf-ready') else