diff --git a/app/views/hosts/console/spice.html.erb b/app/views/hosts/console/spice.html.erb
index d0b9cc411eb..91de1bb8648 100644
--- a/app/views/hosts/console/spice.html.erb
+++ b/app/views/hosts/console/spice.html.erb
@@ -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",
diff --git a/app/views/hosts/console/vnc.html.erb b/app/views/hosts/console/vnc.html.erb
index 28d3e611772..577f1b3c408 100644
--- a/app/views/hosts/console/vnc.html.erb
+++ b/app/views/hosts/console/vnc.html.erb
@@ -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",