Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is in response to an unusual behavior noted with University of Kentucky's use of Shib when their users are authenticated for CRMS access. CRMS determines who is who (matching its users against both the
crms.users
table as well asht.ht_users
) by consulting$ENV{REMOTE_USER}
and falling back to$ENV{email}
.uky.edu
was providingemail
values like[email protected];[email protected]
possibly due to some misconfiguration. I agreed with A&E (after a long slack thread referenced in the ticket) that we should just try to accommodate multiple values as we would fields likeeppn
. This we have an additional loop over possible multiple values of email where previously we have been assuming it held a single value.The commits:
ENV{email}
value and applies needed transformations.SetupUser
to use the new utility. The is the meat of the branch.SetupUser
.Reviewer:
SetupUser
in the area of theENV{email}
check -- there is some cleanup work to be done where the code unnecessarily refers toht_repository
and that is the subject of a lower-priority GitHub issue to be addressed later.extract_env_email
take an optional string parameter defaulting toENV{email}
so we don't have to set and restoreENV
in the tests?