BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
de582ab3
Unverified
Commit
de582ab3
authored
Jul 16, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix user params when edit from admin area
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
aa25c0ff
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
users_controller.rb
app/controllers/admin/users_controller.rb
+4
-2
No files found.
app/controllers/admin/users_controller.rb
View file @
de582ab3
...
@@ -59,15 +59,17 @@ class Admin::UsersController < Admin::ApplicationController
...
@@ -59,15 +59,17 @@ class Admin::UsersController < Admin::ApplicationController
end
end
def
update
def
update
user_params_with_pass
=
user_params
.
dup
if
params
[
:user
][
:password
].
present?
if
params
[
:user
][
:password
].
present?
user_params
.
merge
(
user_params
_with_pass
.
merge!
(
password:
params
[
:user
][
:password
],
password:
params
[
:user
][
:password
],
password_confirmation:
params
[
:user
][
:password_confirmation
],
password_confirmation:
params
[
:user
][
:password_confirmation
],
)
)
end
end
respond_to
do
|
format
|
respond_to
do
|
format
|
if
user
.
update_attributes
(
user_params
)
if
user
.
update_attributes
(
user_params
_with_pass
)
user
.
confirm!
user
.
confirm!
format
.
html
{
redirect_to
[
:admin
,
user
],
notice:
'User was successfully updated.'
}
format
.
html
{
redirect_to
[
:admin
,
user
],
notice:
'User was successfully updated.'
}
format
.
json
{
head
:ok
}
format
.
json
{
head
:ok
}
...
...
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