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
edaabaf4
Commit
edaabaf4
authored
Mar 05, 2019
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated code based on feeddback
parent
84e40a7d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
ee/app/services/group_saml/identity/destroy_service.rb
ee/app/services/group_saml/identity/destroy_service.rb
+4
-2
ee/lib/api/scim.rb
ee/lib/api/scim.rb
+5
-2
No files found.
ee/app/services/group_saml/identity/destroy_service.rb
View file @
edaabaf4
...
...
@@ -12,8 +12,10 @@ module GroupSaml
end
def
execute
identity
.
destroy!
remove_group_access
Identity
.
transaction
do
identity
.
destroy!
remove_group_access
end
end
private
...
...
ee/lib/api/scim.rb
View file @
edaabaf4
...
...
@@ -33,6 +33,10 @@ module API
def
scim_error!
(
message
:)
error!
({
with:
EE
::
Gitlab
::
Scim
::
Error
}.
merge
(
detail:
message
),
409
)
end
def
email_taken?
(
email
,
identity
)
User
.
by_any_email
(
email
.
downcase
).
where
.
not
(
id:
identity
.
user
.
id
).
count
>
0
end
end
resource
:Users
do
...
...
@@ -92,8 +96,7 @@ module API
elsif
parsed_hash
[
:extern_uid
]
identity
.
update
(
parsed_hash
.
slice
(
:extern_uid
))
else
scim_error!
(
message:
'Email has already been taken'
)
if
parsed_hash
[
:email
]
&&
User
.
by_any_email
(
parsed_hash
[
:email
].
downcase
).
where
.
not
(
id:
identity
.
user
.
id
).
count
>
0
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
)
...
...
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