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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
4db922df
Commit
4db922df
authored
Jun 21, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
5a963965
c8c03f1d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
2 deletions
+34
-2
app/views/admin/users/show.html.haml
app/views/admin/users/show.html.haml
+3
-2
changelogs/unreleased/49814-display-in-admin-area-if-emails-are-verified-or-not.yml
...4-display-in-admin-area-if-emails-are-verified-or-not.yml
+5
-0
spec/features/admin/admin_users_spec.rb
spec/features/admin/admin_users_spec.rb
+26
-0
No files found.
app/views/admin/users/show.html.haml
View file @
4db922df
...
@@ -32,11 +32,12 @@
...
@@ -32,11 +32,12 @@
%li
%li
%span
.light
Email:
%span
.light
Email:
%strong
%strong
=
mail_to
@user
.
email
=
render
partial:
'shared/email_with_badge'
,
locals:
{
email:
mail_to
(
@user
.
email
),
verified:
@user
.
confirmed?
}
-
@user
.
emails
.
each
do
|
email
|
-
@user
.
emails
.
each
do
|
email
|
%li
%li
%span
.light
Secondary email:
%span
.light
Secondary email:
%strong
=
email
.
email
%strong
=
render
partial:
'shared/email_with_badge'
,
locals:
{
email:
email
.
email
,
verified:
email
.
confirmed?
}
=
link_to
remove_email_admin_user_path
(
@user
,
email
),
data:
{
confirm:
"Are you sure you want to remove
#{
email
.
email
}
?"
},
method: :delete
,
class:
"btn-sm btn btn-remove float-right"
,
title:
'Remove secondary email'
,
id:
"remove_email_
#{
email
.
id
}
"
do
=
link_to
remove_email_admin_user_path
(
@user
,
email
),
data:
{
confirm:
"Are you sure you want to remove
#{
email
.
email
}
?"
},
method: :delete
,
class:
"btn-sm btn btn-remove float-right"
,
title:
'Remove secondary email'
,
id:
"remove_email_
#{
email
.
id
}
"
do
%i
.fa.fa-times
%i
.fa.fa-times
%li
%li
...
...
changelogs/unreleased/49814-display-in-admin-area-if-emails-are-verified-or-not.yml
0 → 100644
View file @
4db922df
---
title
:
Add a verified pill next to email addresses under the admin users section.
merge_request
:
29669
author
:
type
:
added
spec/features/admin/admin_users_spec.rb
View file @
4db922df
...
@@ -419,6 +419,32 @@ describe "Admin::Users" do
...
@@ -419,6 +419,32 @@ describe "Admin::Users" do
end
end
end
end
end
end
describe
'Email verification status'
do
let!
(
:secondary_email
)
do
create
:email
,
email:
'secondary@example.com'
,
user:
user
end
it
'displays the correct status for an unverified email address'
do
user
.
update
(
confirmed_at:
nil
,
unconfirmed_email:
user
.
email
)
visit
admin_user_path
(
user
)
expect
(
page
).
to
have_content
(
"
#{
user
.
email
}
Unverified"
)
expect
(
page
).
to
have_content
(
"
#{
secondary_email
.
email
}
Unverified"
)
end
it
'displays the correct status for a verified email address'
do
visit
admin_user_path
(
user
)
expect
(
page
).
to
have_content
(
"
#{
user
.
email
}
Verified"
)
secondary_email
.
confirm
expect
(
secondary_email
.
confirmed?
).
to
be_truthy
visit
admin_user_path
(
user
)
expect
(
page
).
to
have_content
(
"
#{
secondary_email
.
email
}
Verified"
)
end
end
end
end
describe
"GET /admin/users/:id/edit"
do
describe
"GET /admin/users/:id/edit"
do
...
...
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