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
253ae9fe
Commit
253ae9fe
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
cc193d70
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
app/controllers/admin/users_controller.rb
app/controllers/admin/users_controller.rb
+5
-3
No files found.
app/controllers/admin/users_controller.rb
View file @
253ae9fe
...
...
@@ -59,15 +59,17 @@ class Admin::UsersController < Admin::ApplicationController
end
def
update
user_params_with_pass
=
user_params
.
dup
if
params
[
:user
][
:password
].
present?
user_params
.
merge
(
user_params
_with_pass
.
merge!
(
password:
params
[
:user
][
:password
],
password_confirmation:
params
[
:user
][
:password_confirmation
],
)
end
respond_to
do
|
format
|
if
user
.
update_attributes
(
user_params
)
if
user
.
update_attributes
(
user_params
_with_pass
)
user
.
confirm!
format
.
html
{
redirect_to
[
:admin
,
user
],
notice:
'User was successfully updated.'
}
format
.
json
{
head
:ok
}
...
...
@@ -114,7 +116,7 @@ class Admin::UsersController < Admin::ApplicationController
:email
,
:remember_me
,
:bio
,
:name
,
:username
,
:skype
,
:linkedin
,
:twitter
,
:website_url
,
:color_scheme_id
,
:theme_id
,
:force_random_password
,
:extern_uid
,
:provider
,
:password_expires_at
,
:avatar
,
:hide_no_ssh_key
,
:projects_limit
,
:can_create_group
,
:admin
,
:password
,
:password_confirmation
:projects_limit
,
:can_create_group
,
:admin
)
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