Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
42d44009
Commit
42d44009
authored
Jul 25, 2018
by
Muhammad Nuzaihan
Committed by
Douwe Maan
Jul 25, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes #47716 where email confirmation fails after adding additional emails
parent
d8e75980
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
0 deletions
+24
-0
app/models/email.rb
app/models/email.rb
+4
-0
changelogs/unreleased/fix-email-confirmation-addtional-email.yml
...ogs/unreleased/fix-email-confirmation-addtional-email.yml
+5
-0
spec/features/users/add_email_to_existing_account.rb
spec/features/users/add_email_to_existing_account.rb
+15
-0
No files found.
app/models/email.rb
View file @
42d44009
...
...
@@ -25,6 +25,10 @@ class Email < ActiveRecord::Base
self
.
errors
.
add
(
:email
,
'has already been taken'
)
if
User
.
exists?
(
email:
self
.
email
)
end
def
accept_pending_invitations!
user
.
accept_pending_invitations!
end
# once email is confirmed, update the gpg signatures
def
update_invalid_gpg_signatures
user
.
update_invalid_gpg_signatures
if
confirmed?
...
...
changelogs/unreleased/fix-email-confirmation-addtional-email.yml
0 → 100644
View file @
42d44009
---
title
:
Fix email confirmation bug when user adds additional email to account
merge_request
:
20084
author
:
muhammadn
type
:
fixed
spec/features/users/add_email_to_existing_account.rb
0 → 100644
View file @
42d44009
require
'spec_helper'
describe
'AdditionalEmailToExistingAccount'
do
describe
'add secondary email associated with account'
do
let
(
:user
)
{
create
(
:user
)
}
it
'verifies confirmation of additional email'
do
sign_in
(
user
)
email
=
create
(
:email
,
user:
user
)
visit
email_confirmation_path
(
confirmation_token:
email
.
confirmation_token
)
expect
(
page
).
to
have_content
'Your email address has been successfully confirmed.'
end
end
end
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