Skip to content

Commit 540cdd9

Browse files
committed
fix: improve comments and doc strings
1 parent 9c2e17b commit 540cdd9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/DIRAC/FrameworkSystem/API/AuthHandler.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -420,12 +420,12 @@ def post_token(self):
420420
return self.server.create_token_response(self.request)
421421

422422
def __researchDIRACGroup(self, extSession, chooseScope, state):
423-
"""Research DIRAC groups for authorized user
423+
"""Look for DIRAC groups of a user already authorized by an Identity Provider
424424
425425
:param dict extSession: ended authorized external IdP session
426426
427427
:return: -- will return (None, response) to provide error or group selector
428-
will return (grant_user, request) to contionue authorization with choosed group
428+
will return (grant_user, request) to continue authorization with choosed group
429429
"""
430430
# Base DIRAC client auth session
431431
firstRequest = createOAuth2Request(extSession["firstRequest"])
@@ -437,7 +437,7 @@ def __researchDIRACGroup(self, extSession, chooseScope, state):
437437
provider = firstRequest.provider
438438
self.log.debug("The following groups found", f"for {username}: {', '.join(firstRequest.groups)}")
439439

440-
# Research Group
440+
# Look for DIRAC groups valid for the user
441441
result = getGroupsForUser(username)
442442
if not result["OK"]:
443443
return None, self.server.handle_response(
@@ -469,7 +469,7 @@ def __researchDIRACGroup(self, extSession, chooseScope, state):
469469
firstRequest.addScopes([f"g:{validGroups[0]}"])
470470
return extSession["authed"], firstRequest
471471

472-
# Else give user chanse to choose group in browser
472+
# Else give user a chance to choose a group in the browser
473473
with dom.div(cls="row mt-5 justify-content-md-center align-items-center") as tag:
474474
for group in sorted(validGroups):
475475
vo, gr = group.split("_")

0 commit comments

Comments
 (0)