Skip to content

Site policy

Settings → Site policy, admin only. Four switches and three values that apply to everybody.

They live in Redis, because they are configuration rather than records — and every read falls back to the default rather than raising, so the site keeps working when Redis does not. Anything not in the list below cannot be set: a typo should fail loudly rather than write a key nothing will ever read.

There is no registration switch. Accounts are created at the identity provider, never here.

The switches

Flag Default Turning it off
sharing_enabled on Stops new share links. A link already handed to somebody keeps working — there is no row to revoke, and breaking something a learner has already sent is not what "off" should mean.
tutor_in_quiz on Removes the tutor from study sessions. Reviewing a finished attempt is unaffected.
clinical_library_enabled off AI drafts cannot be grounded in the indexed clinical library.
pubmed_enabled off AI drafts cannot search PubMed for references.

The tutor is never in an exam, and that is not a setting

It is given the correct answer and told it may explain it, so in an exam it would simply hand it over. tutor_in_quiz decides whether even study mode gets it. Both rules are enforced at the server; the page only decides whether the button is drawn.

The values

Shown only when the switch above them is on, and saved when the field loses focus rather than as you type — a key half entered is a key that does not work.

Value Is
clinical_mcp_url Where the clinical library answers, e.g. http://mcp:8000/mcp. Blank means there is not one. The search does not leave this network.
pubmed_api_key Optional. Raises NCBI's limit from 3 to 10 requests a second.
pubmed_contact_email Optional. Where NCBI writes before they block you.

The key is masked, and saving the mask does nothing

pubmed_api_key is a secret: it is read back as •••••••• plus the last four characters, never in clear. Four characters is enough to tell one key from another and not enough to use it; a settings page that echoes a secret puts it in every screenshot and browser cache from then on.

Because the field saves on blur whether or not it was edited, the mask comes back as if it were a key — so set_value refuses to store anything that starts with the mask. Focusing and leaving the field cannot replace a working key with eight dots.

What these flags reach

Flag Read by
sharing_enabled GET /quizzes/share-policy, checked by the share dialog and enforced when a link is minted
tutor_in_quiz The tutor drawer, and the teach endpoints
clinical_library_enabled, pubmed_enabled GET /articles/ai-sources, which is what decides whether the Draw on switches are offered at all — a switch for a library nobody has configured is a switch that does nothing

Grounding, and the two places it is implemented, are in Drafting with AI.