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
82599467
Commit
82599467
authored
Mar 22, 2019
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove update service
parent
95270ce5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
34 deletions
+0
-34
ee/lib/ee/gitlab/scim/update_user_service.rb
ee/lib/ee/gitlab/scim/update_user_service.rb
+0
-34
No files found.
ee/lib/ee/gitlab/scim/update_user_service.rb
deleted
100644 → 0
View file @
95270ce5
# frozen_string_literal: true
module
EE
module
Gitlab
module
Scim
class
UpdateUserService
def
initialize
(
identity
)
@identity
=
identity
end
# rubocop: disable CodeReuse/ActiveRecord
def
execute
(
params
)
parser
=
EE
::
Gitlab
::
Scim
::
ParamsParser
.
new
(
params
)
parsed_hash
=
parser
.
to_hash
if
parser
.
deprovision_user?
destroy_identity
(
identity
)
elsif
parsed_hash
[
:extern_uid
]
identity
.
update
(
parsed_hash
.
slice
(
:extern_uid
))
else
scim_error!
(
message:
'Email has already been taken'
)
if
email_taken?
(
parsed_hash
[
:email
],
identity
)
result
=
::
Users
::
UpdateService
.
new
(
identity
.
user
,
parsed_hash
.
except
(
:extern_uid
,
:provider
)
.
merge
(
user:
identity
.
user
)).
execute
result
[
:status
]
==
:success
end
end
# rubocop: enable CodeReuse/ActiveRecord
end
end
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