splent_feature_legal
The legal feature of a SPLENT product line.
A SPLENT feature is a Python package that a product composes with others:
its models, routes, services, templates and hooks are registered when the
product starts. What this feature provides and requires is listed in the
[tool.splent.contract] section of pyproject.toml, which
splent feature:contract --write keeps in sync with the source.
What it does
The legal pages of the site, such as the privacy policy, the terms of use
or the cookie policy. Each published page is served at /legal/<slug> and
gets a link in the footer through the layout.footer hook. A page that is
not published answers 404 and has no footer link. A page's content is
stored HTML, and the page draws it through the framework's rich_text
filter, which keeps the formatting and drops scripts, event handlers and
javascript: links.
The panel manages the pages at /admin/legal, where they are added, edited
and deleted.
Access
The screens under /admin/legal open for the accounts whose role is admin
or staff, the same pair the admin dashboard lets in. Any other signed-in
account gets 403 and does not see the Legal pages link in the sidebar, and
an anonymous visitor is sent to log in. The published pages under /legal
and their footer links stay open to everyone, signed in or not, and a page
that is not published answers 404 to everyone.
There is no setting for these roles, and a refinement cannot replace the
views that check them, because it may add routes to this feature but never
replace one of its own. Another feature can decide for these screens with an
access policy registered for the prefix legal.admin
(register_access_policy, splent_framework 1.20.0). The framework asks the
policy before the roles. It answers True to let an account in, False to
refuse it, or None to leave the decision to the roles, and the sidebar link
follows the same answer. That is the way to let a group of accounts manage
only this section, for example the people who keep the legal texts, without
giving them a panel role.
See Access control.
Without such a feature, give the person's account the staff role. Staff
opens every panel screen that asks for PANEL_ROLES, not only this one, so
a person who should manage nothing but the legal pages needs a policy
instead.
splent feature:auth set-role someone@example.com staff
Use it in a product
splent feature:add splent_feature_legal
Develop
splent feature:test splent_feature_legal
splent feature:contract splent_feature_legal
Release
splent feature:release splent_feature_legal --dry-run --bump patch
splent feature:release splent_feature_legal
The first command rehearses the release and changes nothing. The second publishes it to the git forge and to PyPI, and a PyPI version is permanent.
Metadata
Release files for splent-feature-legal 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| splent_feature_legal-0.2.0.tar.gz | 28.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| splent_feature_legal-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 62.4 kB
Release files / splent_feature_legal-0.2.0.tar.gz
| Download URL | splent_feature_legal-0.2.0.tar.gz |
|---|---|
| Size | 28.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4614f042293b5eeb2c201d623cb7c40fed2c93bebdbf07bdb9c0aba471ee2806
|
|
BLAKE2b-256 checksum How to use checksums |
e70b2f8a164ab593dbf94d23022d380bdf2e22140c909a65398beb0a404d03bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.13
|
Release files / splent_feature_legal-0.2.0-py3-none-any.whl
| Download URL | splent_feature_legal-0.2.0-py3-none-any.whl |
|---|---|
| Size | 34.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4fe1ecb2a53fbe773411cd909b946bc02137301e068c67e3c138b28fc298490b
|
|
BLAKE2b-256 checksum How to use checksums |
4bc228994e7d757ce29303759df82fcc399c523ba96c2c0767f781bfa9d3b86e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.13
|
Security for splent-feature-legal 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.