Configuration option to remember terms-of-use acceptance#7776
Open
labkey-adam wants to merge 2 commits into
Open
Configuration option to remember terms-of-use acceptance#7776labkey-adam wants to merge 2 commits into
labkey-adam wants to merge 2 commits into
Conversation
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.
Rationale
We want the option to not require terms-of-use acceptance on every login. This provides a new site settings admin option to remember TOU acceptances for some period of time (current options are 1, 7, or 30 days). Similar to TOTP remember me. https://github.com/LabKey/internal-issues/issues/1202
It also reworks the terms-of-use checking code, which executes on every single request, to be more efficient and consistent. This code needs to determine 1) if terms are configured for the current location and then 2) if the user already accepted those terms.
_termsOfUsewikis at the project and then site level to determine if terms were relevant to the current container. This was all more expensive than it needed to be._termsOfUsewiki is defined. It then checks if those terms have been accepted, either this session or because they haven't yet expired (assuming the new option is being used). If terms have been remembered, the terms container is added to session to short-circuit future checks.The terms-of-use checking code still seems more complicated than it needs to be. But it's a step better than before.