Skip to content

Remove "You are already signed in" banner

Illya Klymov requested to merge ce-remove-already-signed-in into master

What does this MR do?

Removes "You are already signed in" flash message, when user is accessing /users/sign_in while being authenticated Related issue: #59791 (closed)

Notes for reviewers

  • Original flash message is coming from Devise gem and this behavior is not configurable, so we need to disable this helper entirely and replace it with our own one
  • Introduced require_no_authentication_without_flash helper calls original helper and cleans up relevant message if it was added to flash[:alert]
  • We can't keep require_no_authentication running and just clean flash in other helper due to redirect_to in require_no_authentication code
  • Removed not needed part from 2FA auth since we're already capturing that message

Additional notes for security team

  • Extremely minor security impact - we're wrapping existing helper which now not invoked anywhere in existing codebase and cleaning exactly one message

Does this MR meet the acceptance criteria?

Conformity

Performance and testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by 🤖 GitLab Bot 🤖

Merge request reports