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) match = el.match(sa_user)
user = User.find_by_id(match[2].base62_decode) user = User.find_by_id(match[2].base62_decode)
next unless user next unless user
team ||= current_team
popover_for_user_name(user, team) popover_for_user_name(user, team)
end end
new_text new_text

View file

@ -24,8 +24,7 @@ module TinyMceHelper
text.gsub(regex) do |el| text.gsub(regex) do |el|
match = el.match(regex) match = el.match(regex)
img = TinyMceAsset.find_by_id(match[1]) img = TinyMceAsset.find_by_id(match[1])
next unless img && img.team == current_team next unless img && check_image_permissions(obj, img)
next unless check_image_permissions(obj, img)
if pdf_export_ready if pdf_export_ready
report_image_asset_url(img, :tiny_mce_asset, 'tiny-mce-pdf-ready') report_image_asset_url(img, :tiny_mce_asset, 'tiny-mce-pdf-ready')
else else