Fix helpers to use with export all [SCI-2793]

This commit is contained in:
Oleksii Kriuchykhin 2018-10-22 14:32:10 +02:00
parent 00139beb89
commit 81d751974d
2 changed files with 2 additions and 4 deletions

View file

@ -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

View file

@ -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