Merge pull request #4324 from aignatov-bio/ai-sci-7062-marvinjs-save-issue

Fix marvinJS save issue [SCI-7062]
This commit is contained in:
aignatov-bio 2022-08-08 11:52:15 +02:00 committed by GitHub
commit 85cc7ae581
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -122,9 +122,12 @@ class TinyMceAssetsController < ApplicationController
def check_edit_permission def check_edit_permission
if @assoc.nil? if @assoc.nil?
return render_403 unless current_team == @asset.team if current_team == @asset.team
return
else
return render_403
end
end end
case @assoc case @assoc
when StepText when StepText
return render_403 unless can_manage_step?(@assoc.step) return render_403 unless can_manage_step?(@assoc.step)