Skip to content

Commit 6a96a7e

Browse files
authored
Merge pull request #418 from rasoolsomji/rasoolsomji-patch-1
Delete duplicate comment, improve docstring
2 parents ceb48c2 + 31ef60d commit 6a96a7e

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

djangosaml2/backends.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ def get_or_create_user(
263263
attribute_mapping: dict,
264264
request,
265265
) -> tuple[Optional[settings.AUTH_USER_MODEL], bool]:
266-
"""Look up the user to authenticate. If he doesn't exist, this method creates him (if so desired).
266+
"""Look up the user to authenticate. If they doesn't exist, this method creates them (if so desired).
267267
The default implementation looks only at the user_identifier. Override this method in order to do more complex behaviour,
268268
e.g. customize this per IdP.
269269
"""
@@ -277,7 +277,6 @@ def get_or_create_user(
277277
): user_lookup_value
278278
}
279279

280-
# Lookup existing user
281280
# Lookup existing user
282281
user, created = None, False
283282
try:

djangosaml2/cache.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class IdentityCache(Cache):
7272
logged in.
7373
7474
This information is useful because when the user logs out we must
75-
know where does he come from in order to notify such IdP/AA.
75+
know where does they come from in order to notify such IdP/AA.
7676
7777
The current implementation stores this information in the Django session.
7878
"""

djangosaml2/views.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,10 +189,10 @@ def add_idp_hinting(self, http_response):
189189

190190
def should_prevent_auth(self, request) -> bool:
191191
# If the user is already authenticated that maybe because of two reasons:
192-
# A) He has this URL in two browser windows and in the other one he
193-
# has already initiated the authenticated session.
194-
# B) He comes from a view that (incorrectly) send him here because
195-
# he does not have enough permissions. That view should have shown
192+
# A) They have this URL in two browser windows and in the other one they
193+
# have already initiated the authenticated session.
194+
# B) They comes from a view that (incorrectly) sends them here because
195+
# they do not have enough permissions. That view should have shown
196196
# an authorization error in the first place.
197197
return request.user.is_authenticated
198198

0 commit comments

Comments
 (0)