Merge pull request #1459 from betagouv/fix-1164

[Fix #1164] Do not show profile switcher for current profile
This commit is contained in:
Mathieu Magnin 2018-02-21 15:21:00 +01:00 committed by GitHub
commit 30a5a9b4b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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"