Skip to content

Commit

Permalink
Always use public path to logfile in webui
Browse files Browse the repository at this point in the history
There is no benefit in using different routes to the log file,
for authenticated and non authenticated users in the webui,
since both deliver the exact same result.

Fixes openSUSE#9880
  • Loading branch information
krauselukas committed Aug 5, 2020
1 parent dd6efc2 commit 5e3c7aa
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions src/api/app/views/webui/package/_live_build_log_controls.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,12 @@
= link_to('#', class: 'stop_refresh live-link-action btn-dark') do
%i.far.fa-pause-circle
Stop refresh

- if !User.session
= link_to(public_build_path(package: @package, 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(raw_logfile_path(package: @package, project: @project, arch: @arch, repository: @repo),
target: :_blank,
rel: 'noopener',
class: 'live-link-action btn-secondary') do
%i.fas.fa-download
Download logfile
= link_to(public_build_path(package: @package, 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
- if @can_modify
= link_to(package_trigger_rebuild_path(project: @project, package: @package, arch: @arch, repository: @repo),
class: 'link_trigger_rebuild live-link-action btn-warning d-none',
Expand Down

0 comments on commit 5e3c7aa

Please sign in to comment.