Skip to content

Configuration option to remember terms-of-use acceptance#7776

Open
labkey-adam wants to merge 2 commits into
developfrom
fb_terms_of_use
Open

Configuration option to remember terms-of-use acceptance#7776
labkey-adam wants to merge 2 commits into
developfrom
fb_terms_of_use

Conversation

@labkey-adam

@labkey-adam labkey-adam commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

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.

  • Previously, the TOU check first looked in session to see if the user had accepted terms in the current project. But the only projects that were ever added to session are those where terms were defined. So this was wasted effort in nearly all cases. It then proceeded to retrieve wiki HTML from _termsOfUse wikis 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.
  • Now, the check first determines where terms are configured for the current container using a new WikiService entry point that simply indicates whether a _termsOfUse wiki 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant