BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
269594bf
Commit
269594bf
authored
Jan 01, 2018
by
Jacopo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Shows signin tab after new user email confirmation
When a new user confirm his email the signin tab is correctly shown.
parent
50a64953
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
5 deletions
+19
-5
signin_tabs_memoizer.js
...ts/javascripts/pages/sessions/new/signin_tabs_memoizer.js
+4
-2
confirmations_controller.rb
app/controllers/confirmations_controller.rb
+1
-1
_signin_box.html.haml
app/views/devise/shared/_signin_box.html.haml
+1
-1
_tabs_ldap.html.haml
app/views/devise/shared/_tabs_ldap.html.haml
+1
-1
41206-show-signin-pane-after-email-confirmation.yml
...eased/41206-show-signin-pane-after-email-confirmation.yml
+5
-0
signin_tabs_memoizer_spec.js
spec/javascripts/signin_tabs_memoizer_spec.js
+7
-0
No files found.
app/assets/javascripts/pages/sessions/new/signin_tabs_memoizer.js
View file @
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
();
}
...
...
app/controllers/confirmations_controller.rb
View file @
269594bf
...
...
@@ -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
...
...
app/views/devise/shared/_signin_box.html.haml
View file @
269594bf
...
...
@@ -8,7 +8,7 @@
.login-body
=
render
'devise/sessions/new_ldap'
,
server:
server
-
if
password_authentication_enabled_for_web?
.login-box.tab-pane
{
id:
'l
dap-standard
'
,
role:
'tabpanel'
}
.login-box.tab-pane
{
id:
'l
ogin-pane
'
,
role:
'tabpanel'
}
.login-body
=
render
'devise/sessions/new_base'
...
...
app/views/devise/shared/_tabs_ldap.html.haml
View file @
269594bf
...
...
@@ -7,7 +7,7 @@
=
link_to
server
[
'label'
],
"#
#{
server
[
'provider_name'
]
}
"
,
'data-toggle'
=>
'tab'
-
if
password_authentication_enabled_for_web?
%li
=
link_to
'Standard'
,
'#l
dap-standard
'
,
'data-toggle'
=>
'tab'
=
link_to
'Standard'
,
'#l
ogin-pane
'
,
'data-toggle'
=>
'tab'
-
if
allow_signup?
%li
=
link_to
'Register'
,
'#register-pane'
,
'data-toggle'
=>
'tab'
changelogs/unreleased/41206-show-signin-pane-after-email-confirmation.yml
0 → 100644
View file @
269594bf
---
title
:
Shows signin tab after new user email confirmation
merge_request
:
16174
author
:
Jacopo Beschi @jacopo-beschi
type
:
fixed
spec/javascripts/signin_tabs_memoizer_spec.js
View file @
269594bf
...
...
@@ -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
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment