Repository navigation
Conversation
…ive user.
Content generators and the login status template fetched the authenticated
user's record from the database again even though it is already cached in
`$c->authen->{user}`. Use the cached record instead, and keep it current when
the LTI modules or the Options and UserList pages update that user. Since the
cached user always exists in Feedback and GatewayQuiz, the checks for a missing
user there are removed. Also preserve `showOldAnswers` when an LTI login
updates a user's data.
Validate and cache the effective user during dispatch. The effective
user was not validated until the login status template was rendered, and
content generators fetched the effective user's record from the database
again. Now `WeBWorK::dispatch` validates the effective user, falls back
to the real user if it does not exist, and caches the record in
`$c->authen->{effective_user}`. Use that cached record everywhere
instead, and remove the checks for a missing effective user that are no
longer needed.
Remove the unused permission level argument from the GatewayQuiz "can"
methods. The permission level was fetched from the database and passed
to all of the "can" methods, but none of them used it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
drgrice1
force-pushed
the
authen-cached-user-usage
branch
from
November 9, 2026 17:37
6cec242 to
b2dc132
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Content generators and the login status template fetched the authenticated user's record from the database again even though it is already cached in
$c->authen->{user}. Use the cached record instead, and keep it current when the LTI modules or the Options and UserList pages update that user. Since the cached user always exists in Feedback and GatewayQuiz, the checks for a missing user there are removed. Also preserveshowOldAnswerswhen an LTI login updates a user's data.Validate and cache the effective user during dispatch. The effective user was not validated until the login status template was rendered, and content generators fetched the effective user's record from the database again. Now
WeBWorK::dispatchvalidates the effective user, falls back to the real user if it does not exist, and caches the record in$c->authen->{effective_user}. Use that cached record everywhere instead, and remove the checks for a missing effective user that are no longer needed.Remove the unused permission level argument from the GatewayQuiz "can" methods. The permission level was fetched from the database and passed to all of the "can" methods, but none of them used it.