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
b2d53791
Commit
b2d53791
authored
Sep 13, 2017
by
Brett Walker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix calls to Emails::DestroyService
parent
09726bdf
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
app/controllers/admin/users_controller.rb
app/controllers/admin/users_controller.rb
+1
-1
lib/api/users.rb
lib/api/users.rb
+2
-2
No files found.
app/controllers/admin/users_controller.rb
View file @
b2d53791
...
...
@@ -155,7 +155,7 @@ class Admin::UsersController < Admin::ApplicationController
def
remove_email
email
=
user
.
emails
.
find
(
params
[
:email_id
])
success
=
Emails
::
DestroyService
.
new
(
user
,
email:
email
.
email
).
execute
success
=
Emails
::
DestroyService
.
new
(
user
).
execute
(
email
)
respond_to
do
|
format
|
if
success
...
...
lib/api/users.rb
View file @
b2d53791
...
...
@@ -366,7 +366,7 @@ module API
not_found!
(
'Email'
)
unless
email
destroy_conditionally!
(
email
)
do
|
email
|
Emails
::
DestroyService
.
new
(
current_user
,
email:
email
.
email
).
execute
Emails
::
DestroyService
.
new
(
current_user
).
execute
(
email
)
end
user
.
update_secondary_emails!
...
...
@@ -689,7 +689,7 @@ module API
not_found!
(
'Email'
)
unless
email
destroy_conditionally!
(
email
)
do
|
email
|
Emails
::
DestroyService
.
new
(
current_user
,
email:
email
.
email
).
execute
Emails
::
DestroyService
.
new
(
current_user
).
execute
(
email
)
end
current_user
.
update_secondary_emails!
...
...
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