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
37425618
Commit
37425618
authored
Jun 23, 2014
by
Marin Jankovski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add option for admin to remove users secondary emails.
parent
73c1030d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
0 deletions
+13
-0
app/controllers/admin/users_controller.rb
app/controllers/admin/users_controller.rb
+10
-0
app/views/admin/users/show.html.haml
app/views/admin/users/show.html.haml
+2
-0
config/routes.rb
config/routes.rb
+1
-0
No files found.
app/controllers/admin/users_controller.rb
View file @
37425618
...
...
@@ -100,6 +100,16 @@ class Admin::UsersController < Admin::ApplicationController
end
end
def
remove_email
email
=
user
.
emails
.
find
(
params
[
:email_id
])
email
.
destroy
respond_to
do
|
format
|
format
.
html
{
redirect_to
:back
,
notice:
"Successfully removed email."
}
format
.
js
{
render
nothing:
true
}
end
end
protected
def
user
...
...
app/views/admin/users/show.html.haml
View file @
37425618
...
...
@@ -44,6 +44,8 @@
%li
%span
.light
Secondary email:
%strong
=
email
.
email
=
link_to
remove_email_admin_user_path
(
@user
,
email
),
data:
{
confirm:
"Are you sure you want to remove
#{
email
.
email
}
?"
},
method: :delete
,
class:
"btn-tiny btn btn-remove pull-right"
,
title:
'Remove secondary email'
do
%i
.icon-remove
%li
%span
.light
Can create groups:
...
...
config/routes.rb
View file @
37425618
...
...
@@ -68,6 +68,7 @@ Gitlab::Application.routes.draw do
put
:team_update
put
:block
put
:unblock
delete
'remove/:email_id'
,
action:
'remove_email'
,
as:
'remove_email'
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