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
Boxiang Sun
gitlab-ce
Commits
bf3a3f36
Commit
bf3a3f36
authored
Jun 16, 2017
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix api and controller issues
parent
36bc2e90
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
app/controllers/admin/users_controller.rb
app/controllers/admin/users_controller.rb
+2
-2
lib/api/users.rb
lib/api/users.rb
+7
-2
No files found.
app/controllers/admin/users_controller.rb
View file @
bf3a3f36
...
...
@@ -154,7 +154,7 @@ class Admin::UsersController < Admin::ApplicationController
email
=
user
.
emails
.
find
(
params
[
:email_id
])
email
.
destroy
result
=
Users
::
UpdateService
.
new
(
current_user
,
@user
).
execute
do
result
=
Users
::
UpdateService
.
new
(
current_user
,
@user
).
execute
do
|
user
|
user
.
update_secondary_emails!
end
...
...
@@ -215,7 +215,7 @@ class Admin::UsersController < Admin::ApplicationController
end
def
update_user
result
=
Users
::
UpdateService
.
new
(
current_user
,
user
).
execute
do
result
=
Users
::
UpdateService
.
new
(
current_user
,
user
).
execute
do
|
user
|
yield
(
user
)
end
...
...
lib/api/users.rb
View file @
bf3a3f36
...
...
@@ -277,8 +277,11 @@ module API
not_found!
(
'Email'
)
unless
email
email
.
destroy
Users
::
UpdateService
.
new
(
current_user
,
user
).
execute
do
|
user
|
user
.
update_secondary_emails!
end
end
desc
'Delete a user. Available only for admins.'
do
success
Entities
::
Email
...
...
@@ -508,7 +511,9 @@ module API
not_found!
(
'Email'
)
unless
email
email
.
destroy
current_user
.
update_secondary_emails!
Users
::
UpdateService
.
new
(
current_user
,
user
).
execute
do
|
user
|
user
.
update_secondary_emails!
end
end
desc
'Get a list of user activities'
...
...
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