From 368b702647519380185f7e4f8f184e047da5cd97 Mon Sep 17 00:00:00 2001 From: Eduardo Navarro Date: Tue, 27 Aug 2024 17:00:49 +0200 Subject: [PATCH] Provide "Download logfile" URL depending on ... ... intance anonymous configuration --- .../packages/build_log/_live_build_log_controls.html.haml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/api/app/views/webui/packages/build_log/_live_build_log_controls.html.haml b/src/api/app/views/webui/packages/build_log/_live_build_log_controls.html.haml index d6cdeb448d5d..b25cf62000e5 100644 --- a/src/api/app/views/webui/packages/build_log/_live_build_log_controls.html.haml +++ b/src/api/app/views/webui/packages/build_log/_live_build_log_controls.html.haml @@ -6,15 +6,15 @@ %i.far.fa-pause-circle Stop refresh - - if User.session - = link_to(raw_logfile_path(package: package_name, project: project, arch: arch, repository: repo), + - if ::Configuration.anonymous + = link_to(public_build_path(package: package_name, project: project, arch: arch, repository: repo, filename: '_log'), target: :_blank, rel: 'noopener', class: 'live-link-action btn-secondary') do %i.fas.fa-download Download logfile - else - = link_to(public_build_path(package: package_name, project: project, arch: arch, repository: repo, filename: '_log'), + = link_to(raw_logfile_path(package: package_name, project: project, arch: arch, repository: repo), target: :_blank, rel: 'noopener', class: 'live-link-action btn-secondary') do