Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
fisx committed Sep 3, 2020
1 parent fe92678 commit f88559d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion services/spar/src/Spar/Scim/User.hs
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,8 @@ updateVsuUref uid old new = do

Brig.setBrigUserVeid uid new

-- TODO: how do we claim emails before writing them?

toScimStoredUser ::
UserId ->
Scim.User ST.SparTag ->
Expand Down Expand Up @@ -530,7 +532,7 @@ calculateVersion uid usr = Scim.Weak (Text.pack (show h))
--
-- ASSUMPTION: every scim user has a 'SAML.UserRef', and the `SAML.NameID` in it corresponds
-- to a single `externalId`.
assertUserRefUnused :: SAML.UserRef -> Scim.ScimHandler Spar ()
assertUserRefUnused :: SAML.UserRef -> Scim.ScimHandler Spar () -- we could take a veid here and check that scim_external_ids doesn't have an entry either. very race-conditionie!
assertUserRefUnused userRef = do
mExistingUserId <- lift $ getUser userRef
unless (isNothing mExistingUserId) $
Expand Down

0 comments on commit f88559d

Please sign in to comment.