From 2edba4e188442ad63846449e661ab9903978ad33 Mon Sep 17 00:00:00 2001 From: Martin Artnik Date: Wed, 27 Sep 2023 14:13:34 +0200 Subject: [PATCH] Fix for downloading assets not in current user team [SCI-9353] --- app/controllers/assets_controller.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/controllers/assets_controller.rb b/app/controllers/assets_controller.rb index 62e31231a..85a28583d 100644 --- a/app/controllers/assets_controller.rb +++ b/app/controllers/assets_controller.rb @@ -319,6 +319,8 @@ class AssetsController < ApplicationController @asset = Asset.find_by(id: params[:id]) return render_404 unless @asset + current_user.permission_team = @asset.team + @assoc ||= @asset.step @assoc ||= @asset.result @assoc ||= @asset.repository_cell