Only show admin shortcut when authorized to visit

What does this MR do and why?

This change hides the admin area shortcut when user needs to authenticate to enter admin mode

References

https://gitlab.com/gitlab-org/gitlab/-/issues/567702#note_2781850105

Screenshots or screen recordings

Before After
127.0.0.1_3000_admin_session_new__3_ 127.0.0.1_3000_admin_session_new
127.0.0.1_3000_admin_session_new (2).png 127.0.0.1_3000_admin_session_new (1).png
127.0.0.1_3000_ (12).png 127.0.0.1_3000_ (11).png
127.0.0.1_3000_ (13).png 127.0.0.1_3000_ (10).png

How to set up and validate locally

  1. Turn on the new UI
  2. Visit http://127.0.0.1:3000/admin/application_settings/general#js-signin-settings to Enable Admin Mode
  3. Toggle on and off Admin Mode. Check for the presence of the Admin shortcut in xl and md viewports

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports

Loading