[BUG FIX] [MER-4262] fix an issue where admins cannot access assessment settings for sections #5440
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.
https://eliterate.atlassian.net/browse/MER-4262
Fixes an issue where when logged in as an admin, the assessment settings page throws a 500 error.
The issue was caused by the result user of
Mount.for
inSettingsLive
overwriting thecurrent_user
assigns with an Author (the logged in admin account). This was causing some of the UserAuth logic to break.This was originally being worked on as part of MER-4262, but since there is a separate ticket targeted for this specific issue I am submitting this fix for MER-4262 and any additional work done for MER-4262 will be tracked by that Jira ticket and completed with another PR.