spacr.qt.terms¶
Terms-of-use acceptance and version records for a spaCR profile.
spaCR presents its terms during setup and records the accepted
TERMS_VERSION with a UTC timestamp. A profile must accept a revised
version explicitly; acceptance of an earlier version is not carried forward.
The record is stored with the other setup values under the onboarding/
prefix.
Functions¶
|
When this profile accepted, in UTC ISO-8601, or |
|
The terms version this profile accepted, or |
|
Return the recorded and current agreement metadata. |
|
Return whether the profile must accept the requested terms version. |
|
Record acceptance of a terms version and return the stored version. |
|
Register this screen's localized captions. |
|
Return the terms with a blank line between clauses. |
Module Contents¶
- spacr.qt.terms.agreed_at() str[source]¶
When this profile accepted, in UTC ISO-8601, or
""if never.
- spacr.qt.terms.agreed_version() str[source]¶
The terms version this profile accepted, or
""if none.
- spacr.qt.terms.agreement_record() Dict[str, str][source]¶
Return the recorded and current agreement metadata.
- Returns:
{'version', 'accepted_at', 'current_version', 'license'}.versionis empty for a profile that has never accepted, which is a different answer from having accepted an older version and the reason both are reported rather than one boolean.
- spacr.qt.terms.needs_agreement(version: str = '') bool[source]¶
Return whether the profile must accept the requested terms version.
- Parameters:
version – the version to check against. Defaults to
TERMS_VERSION.
Returns
Truewhen no acceptance is recorded or when the recorded version differs from the requested version.
- spacr.qt.terms.record_agreement(version: str = '') str[source]¶
Record acceptance of a terms version and return the stored version.
- Parameters:
version – the terms version accepted. Defaults to
TERMS_VERSION, which is what the screen shows.
- spacr.qt.terms.register_translations() int[source]¶
Register this screen’s localized captions.
- Returns:
number of rows added; repeated registration returns
0.
- spacr.qt.terms.terms_text(language: str | None = None) str[source]¶
Return the terms with a blank line between clauses.
- Parameters:
language – language code to present the agreement in.
Noneuses the profile’s current language. A locale with no translated presentation gets the English, which is always correct here.
THE ENGLISH IS THE AGREEMENT. Section 11.4 says so: a translation is a convenience and the English governs. So a missing or partial translation is never an error condition – it falls back and the document a profile accepts is unchanged, which is why
record_agreementstoresTERMS_VERSIONand nothing about the language on screen.