BigW Consortium Gitlab

Commit 8d6b029e by Clement Ho

Merge branch '41206-show-signin-pane-after-email-confirmation' into 'master'

Resolve "New user is sent back to Register tab after confirming email" Closes #41206 See merge request gitlab-org/gitlab-ce!16174
parents 7fa0a3e7 269594bf
/* eslint no-param-reassign: ["error", { "props": false }]*/
/* eslint no-new: "off" */
import AccessorUtilities from '~/lib/utils/accessor';
/**
......@@ -11,6 +9,10 @@ export default class SigninTabsMemoizer {
this.currentTabKey = currentTabKey;
this.tabSelector = tabSelector;
this.isLocalStorageAvailable = AccessorUtilities.isLocalStorageAccessSafe();
// sets selected tab if given as hash tag
if (window.location.hash) {
this.saveData(window.location.hash);
}
this.bootstrap();
}
......
......@@ -17,7 +17,7 @@ class ConfirmationsController < Devise::ConfirmationsController
else
Gitlab::AppLogger.info("Email Confirmed: username=#{resource.username} email=#{resource.email} ip=#{request.remote_ip}")
flash[:notice] += " Please sign in."
new_session_path(:user)
new_session_path(:user, anchor: 'login-pane')
end
end
......
......@@ -8,7 +8,7 @@
.login-body
= render 'devise/sessions/new_ldap', server: server
- if password_authentication_enabled_for_web?
.login-box.tab-pane{ id: 'ldap-standard', role: 'tabpanel' }
.login-box.tab-pane{ id: 'login-pane', role: 'tabpanel' }
.login-body
= render 'devise/sessions/new_base'
......
......@@ -7,7 +7,7 @@
= link_to server['label'], "##{server['provider_name']}", 'data-toggle' => 'tab'
- if password_authentication_enabled_for_web?
%li
= link_to 'Standard', '#ldap-standard', 'data-toggle' => 'tab'
= link_to 'Standard', '#login-pane', 'data-toggle' => 'tab'
- if allow_signup?
%li
= link_to 'Register', '#register-pane', 'data-toggle' => 'tab'
---
title: Shows signin tab after new user email confirmation
merge_request: 16174
author: Jacopo Beschi @jacopo-beschi
type: fixed
......@@ -53,6 +53,13 @@ import SigninTabsMemoizer from '~/pages/sessions/new/signin_tabs_memoizer';
expect(memo.readData()).toEqual('#standard');
});
it('overrides last selected tab with hash tag when given', () => {
window.location.hash = '#ldap';
createMemoizer();
expect(memo.readData()).toEqual('#ldap');
});
describe('class constructor', () => {
beforeEach(() => {
memo = createMemoizer();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment