Skip to content

Commit

Permalink
Fixes #36139 - Respect old/new host details in spice/vnc
Browse files Browse the repository at this point in the history
  • Loading branch information
adamruzicka authored and ofedoren committed Mar 1, 2023
1 parent fc939f0 commit 51b8d8e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/views/hosts/console/spice.html.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<% title "#{@console[:name]}" %>
<%= title_actions(
button_group(link_to(_("Ctrl-Alt-Del"), "#", :id => "sendCtrlAltDelButton", :onclick => 'tfm.spice.sendCtrlAltDel()', :class => "btn btn-default"),
if @host
link_to_if_authorized(_("Back to host"), hash_for_host_path(:id => @host), :title => _("Back to host"), :class => 'btn btn-default')
if @host && authorized_for(hash_for_host_path(@host))
link_to(_("Back to host"), current_host_details_path(:id => @host), :title => _("Back to host"), :class => 'btn btn-default')
end
),
documentation_button("7.1NoVNC",
Expand Down
4 changes: 2 additions & 2 deletions app/views/hosts/console/vnc.html.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<% title "#{@console[:name]}" %>
<%= title_actions(
button_group(link_to("Ctrl-Alt-Del", "#", :id => "sendCtrlAltDelButton", :class => "btn btn-default"),
if @host
link_to_if_authorized(_("Back to host"), hash_for_host_path(:id => @host), :title => _("Back to host"), :class => 'btn btn-default')
if @host && authorized_for(hash_for_host_path(@host))
link_to(_("Back to host"), current_host_details_path(:id => @host), :title => _("Back to host"), :class => 'btn btn-default')
end
),
documentation_button("7.1NoVNC",
Expand Down

0 comments on commit 51b8d8e

Please sign in to comment.