mitol-django-scim 2025.5.23__py3-none-any.whl → 2025.5.30.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- CHANGELOG.md +15 -0
- mitol/scim/__init__.py +1 -1
- mitol/scim/api.py +12 -5
- {mitol_django_scim-2025.5.23.dist-info → mitol_django_scim-2025.5.30.1.dist-info}/METADATA +1 -1
- {mitol_django_scim-2025.5.23.dist-info → mitol_django_scim-2025.5.30.1.dist-info}/RECORD +6 -6
- {mitol_django_scim-2025.5.23.dist-info → mitol_django_scim-2025.5.30.1.dist-info}/WHEEL +0 -0
CHANGELOG.md
CHANGED
@@ -6,6 +6,21 @@ and this project uses date-based versioning.
|
|
6
6
|
|
7
7
|
<!-- scriv-insert-here -->
|
8
8
|
|
9
|
+
<a id='changelog-2025.5.30.1'></a>
|
10
|
+
## [2025.5.30.1] - 2025-05-30
|
11
|
+
|
12
|
+
### Fixed
|
13
|
+
|
14
|
+
- Fixed a duplicate user on sync error
|
15
|
+
|
16
|
+
<a id='changelog-2025.5.30'></a>
|
17
|
+
## [2025.5.30] - 2025-05-30
|
18
|
+
|
19
|
+
### Fixed
|
20
|
+
|
21
|
+
- Fixed status code handling for batch operations
|
22
|
+
- Fixed email case sensitivity issue with scim sync
|
23
|
+
|
9
24
|
<a id='changelog-2025.5.23'></a>
|
10
25
|
## [2025.5.23] - 2025-05-23
|
11
26
|
|
mitol/scim/__init__.py
CHANGED
mitol/scim/api.py
CHANGED
@@ -95,7 +95,7 @@ def _user_search_by_email(
|
|
95
95
|
session: OAuth2Session, users: list["User"]
|
96
96
|
) -> StateOrOperationGenerator:
|
97
97
|
"""Perform a search for a set of users by email"""
|
98
|
-
users_by_email = {user.email: user for user in users}
|
98
|
+
users_by_email = {user.email.lower(): user for user in users}
|
99
99
|
|
100
100
|
payload = {
|
101
101
|
"schemas": [SchemaURI.SERACH_REQUEST], # typo in upstream lib
|
@@ -127,12 +127,18 @@ def _user_search_by_email(
|
|
127
127
|
for resource in resources:
|
128
128
|
email = first(
|
129
129
|
[
|
130
|
-
email["value"]
|
130
|
+
email["value"].lower()
|
131
131
|
for email in resource.get("emails", [])
|
132
132
|
if email.get("primary", False)
|
133
133
|
]
|
134
134
|
)
|
135
|
-
if email is
|
135
|
+
if email is None:
|
136
|
+
log.error("Unexpected user result with no email")
|
137
|
+
elif email not in users_by_email:
|
138
|
+
log.error(
|
139
|
+
"Received an email in search results that does not match: %s", email
|
140
|
+
)
|
141
|
+
else:
|
136
142
|
yield UserState(users_by_email[email], resource["id"])
|
137
143
|
|
138
144
|
if not resources:
|
@@ -156,7 +162,8 @@ def _get_sync_operations(
|
|
156
162
|
for user_resource in found_users:
|
157
163
|
user = user_resource.user
|
158
164
|
|
159
|
-
missing_users
|
165
|
+
if user in missing_users:
|
166
|
+
missing_users.remove(user)
|
160
167
|
|
161
168
|
yield user_resource
|
162
169
|
|
@@ -232,7 +239,7 @@ def _perform_sync_operations(
|
|
232
239
|
bulk_id = operation["bulkId"]
|
233
240
|
user = users_by_bulk_id[bulk_id]
|
234
241
|
|
235
|
-
if operation["status"] !=
|
242
|
+
if int(operation["status"]) != http.HTTPStatus.CREATED:
|
236
243
|
log.error(
|
237
244
|
"Unable to perform operation for user: %s, response: %s",
|
238
245
|
str(user),
|
@@ -1,10 +1,10 @@
|
|
1
|
-
CHANGELOG.md,sha256=
|
1
|
+
CHANGELOG.md,sha256=9gS_J7L8ojAVtqvYrizptJ8vQpOqa-89tJXdW6GhNjM,916
|
2
2
|
README.md,sha256=BtRLbXiY3j5At4nfZdxnlHBgrTq4TeyBj3R0fDxNkQw,1599
|
3
3
|
mitol/__init__.py,sha256=q3JNmHn0CMPtEqkMR40lkjKQzuWUtT39xIFUYJ-MKIE,56
|
4
4
|
mitol/scim/README.md,sha256=d3fHo_YbqpNcjksOLoQC-6ZCOBuKKUermGbtnYgxGVI,1502
|
5
|
-
mitol/scim/__init__.py,sha256=
|
5
|
+
mitol/scim/__init__.py,sha256=yCb3SH9hvwXO3zAWW5_t4F6atrVKqAOv6vrtiITChMw,137
|
6
6
|
mitol/scim/adapters.py,sha256=_NCi3tyDepq5oi5DscoERaW4V67soUjiLcv8nPvk59U,7729
|
7
|
-
mitol/scim/api.py,sha256=
|
7
|
+
mitol/scim/api.py,sha256=dO1kJNDGEGi3bG70CLutMqSPMIV_qfNLiDq15W09bvc,7915
|
8
8
|
mitol/scim/apps.py,sha256=wsvBGEASCFfFereo7p_CKkynibUlayTSIu0aM0LyMN4,399
|
9
9
|
mitol/scim/config.py,sha256=vMGOGgeU4QXXJF9yzxucscelN6ETH6NfW_TYBYackkE,328
|
10
10
|
mitol/scim/constants.py,sha256=Di1Vmy26_dm0con_gP2lBf_O79ucI5jOpQdl6SB-LEs,393
|
@@ -21,6 +21,6 @@ mitol/scim/management/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5
|
|
21
21
|
mitol/scim/management/commands/scim_push.py,sha256=hzrIdCU93uptv2S0jyJUi7hV0had30SDbdm0Po0sJR8,514
|
22
22
|
mitol/scim/settings/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
23
23
|
mitol/scim/settings/scim.py,sha256=szxU7WZXSbNXvGNIm3Lyy-cXFdPUPevjmicGIYQyR-Y,1876
|
24
|
-
mitol_django_scim-2025.5.
|
25
|
-
mitol_django_scim-2025.5.
|
26
|
-
mitol_django_scim-2025.5.
|
24
|
+
mitol_django_scim-2025.5.30.1.dist-info/METADATA,sha256=6ndPfCHpSqoUjlRVzlIj8m3uec0utSc0gO5Ed1AVr6M,2182
|
25
|
+
mitol_django_scim-2025.5.30.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
26
|
+
mitol_django_scim-2025.5.30.1.dist-info/RECORD,,
|
File without changes
|