collective.lockdown
Lock Plone against the Site Administrator role.
This restricts Site Administrator to: manage content, and manage users. It prevents Site Administrator from reconfiguring the site or making layout changes.
This package should be suitable for both Plone classicui and Plone headless.
What it does
Site owners at the client side need permissions to properly manage content and users. However, if your setup is such that as an integrator you’re responsible for views and site configuration, the default Plone permission set for Site Administrator is too wide.
We’ve seen users switch the default layout to something not properly supported, or otherwise muck up the configuration of their site. Then they open a support ticket “the site is broken” — without disclosing what they just did.
On install, this add-on strips Site Administrator from a curated set of permissions on the Plone site root:
every Plone Site Setup: * permission except Overview (so the Site Setup link in the toolbar still works) and Users and Groups (so user administration remains possible);
Portlets: Manage portlets;
Modify view template.
The control-panel index view self-filters its rendered configlets by per-configlet permission, so stripping the underlying permissions is sufficient to hide everything except the user management card.
The install handler writes role lists surgically via manage_permission (with acquisition disabled, so role grants cannot leak back in through Zope-root acquisition). Permissions outside the lockdown set are not touched.
Uninstall
Uninstalling via Site Setup → Add-ons restores every lockdown permission to its upstream Plone baseline — both the role list and the acquisition flag — using a snapshot of a vanilla Plone fixture captured at package build time. The configlet conditions are also cleared back to empty. The result is indistinguishable from a Plone site on which the add-on was never installed.
Installation
Install collective.lockdown by adding it to your buildout:
[buildout]
...
eggs =
collective.lockdown
and then running bin/buildout.
Development
Routine tests run at the default level:
bin/test -s collective.lockdown
The upstream permission baseline lives in collective/lockdown/default_permissions.py and is checked against a vanilla Plone fixture by a level-2 drift detector. It is skipped from default runs, because running tests with side effects is unclean, and the data only changes on Plone upgrades. To audit and, if necessary, regenerate the snapshot:
bin/test -s collective.lockdown --at-level 2
On drift, the test rewrites default_permissions.py in place and fails with a diff summary — review and commit the result.
Note that when the default_permissions change, you’ll have to re-run the tests in order for them to pick up the newly generated default permissions correctly.
Contribute
Issue Tracker: https://github.com/collective/collective.lockdown/issues
Source Code: https://github.com/collective/collective.lockdown
License
The project is licensed under the GPLv2.
Contributors
Guido A.J. Stevens, guido.stevens@cosent.net
Changelog
1.1.0 (2026-05-29)
Switch fully to PEP-420 native namespace.
1.0.0 (2026-05-29)
Initial release. [gyst]
Rename from collective.lockdownclassicui -> collective.lockdown [gyst]
Metadata
Release files for collective.lockdown 1.1.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 | |
|---|---|---|---|
| collective_lockdown-1.1.0.tar.gz | 30.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| collective_lockdown-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 60.3 kB
Release files / collective_lockdown-1.1.0.tar.gz
| Download URL | collective_lockdown-1.1.0.tar.gz |
|---|---|
| Size | 30.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d4799a5c82898e11459dc6b612d05be45d241bc749db5cd5cc8948006e3b583f
|
|
BLAKE2b-256 checksum How to use checksums |
0627339798b6a714c1dcb8fb07faaf26becf1c805fd538fae955d61199619dad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / collective_lockdown-1.1.0-py3-none-any.whl
| Download URL | collective_lockdown-1.1.0-py3-none-any.whl |
|---|---|
| Size | 30.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d9489e62afc45f8803e14066dc47ec96f8a7dd9e92b7b11b5031d3ad6a022c66
|
|
BLAKE2b-256 checksum How to use checksums |
dd1695c468570bfcdb5b0938f59e280796e48e4a384e96255c020b71df83f89b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|