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
Léo-Paul Géneau
gitlab-ce
Commits
039d4a1c
Commit
039d4a1c
authored
Nov 21, 2016
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix StrongAttibutes error with Ruby 2.1
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
80eaed16
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
lib/api/users.rb
lib/api/users.rb
+5
-4
No files found.
lib/api/users.rb
View file @
039d4a1c
...
...
@@ -140,7 +140,8 @@ module API
User
.
where
(
username:
params
[
:username
]).
where
.
not
(
id:
user
.
id
).
count
>
0
identity_attrs
=
params
.
slice
(
:provider
,
:extern_uid
)
user_params
=
declared_params
(
include_missing:
false
)
identity_attrs
=
user_params
.
slice
(
:provider
,
:extern_uid
)
if
identity_attrs
.
any?
identity
=
user
.
identities
.
find_by
(
provider:
identity_attrs
[
:provider
])
...
...
@@ -154,10 +155,10 @@ module API
end
# Delete already handled parameters
params
.
delete
(
:extern_uid
)
params
.
delete
(
:provider
)
user_
params
.
delete
(
:extern_uid
)
user_
params
.
delete
(
:provider
)
if
user
.
update_attributes
(
declared_params
(
include_missing:
false
)
)
if
user
.
update_attributes
(
user_params
)
present
user
,
with:
Entities
::
UserFull
else
render_validation_error!
(
user
)
...
...
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