From 3efcadd855166980c0ee0c9edaf2fcfe014d86f0 Mon Sep 17 00:00:00 2001 From: Mathieu Magnin Date: Wed, 21 Feb 2018 15:00:33 +0100 Subject: [PATCH] [Fix #1164] Do not show profile switcher for current profile --- app/views/layouts/_new_header.haml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/layouts/_new_header.haml b/app/views/layouts/_new_header.haml index 2bdc8be3e..bfab4a5e9 100644 --- a/app/views/layouts/_new_header.haml +++ b/app/views/layouts/_new_header.haml @@ -53,17 +53,17 @@ = image_tag "icons/super-admin.svg" Passer en super-admin - if SwitchDeviseProfileService.new(warden).multiple_devise_profile_connect? - - if user_signed_in? + - if user_signed_in? && nav_bar_profile != :usager %li = link_to users_dossiers_path, class: "menu-item menu-link" do = image_tag "icons/switch-profile.svg" Passer en usager - - if gestionnaire_signed_in? + - if gestionnaire_signed_in? && nav_bar_profile != :gestionnaire %li = link_to procedures_path, class: "menu-item menu-link" do = image_tag "icons/switch-profile.svg" Passer en accompagnateur - - if administrateur_signed_in? + - if administrateur_signed_in? && nav_bar_profile != :administrateur %li = link_to admin_procedures_path, class: "menu-item menu-link" do = image_tag "icons/switch-profile.svg"