==================
iw.rejectanonymous
==================
What is iw.rejectanonymous ?
============================
This package is made to reject unconditionnally anonymous users from a Plone
site, without any change in your security policy matrix or workflows. They
should get redirected by plone to login form. The basic use case is an extranet,
where all visitors must be authenticated.
Works with
==========
Plone 3, 4, 5
Installation
============
Add ``iw.rejectanonymous`` to the ``eggs`` option of your
``plone.recipe.zope2instance`` part ::
...
[instance]
recipe = plone.recipe.zope2instance
...
eggs =
...
iw.rejectanonymous
...
...
# The ZCML slug is no more required with Plone 3.3 and up
zcml =
...
iw.rejectanonymous
...
Re-run buildout, then open the "Security" control panel of any Plone site of
your instance. A new **Private site** checkbox lets you (de)activate
``iw.rejectanonymous``.
Customization
=============
``iw.rejectanonymous`` enables the publication of some resources to the
anonymous user, more specifically to enable all media and resources required
from the standard loging page and the password reset page.
Adding valid ids
----------------
If your customized logging page requires some specific images or your site
policy component provides a signup page which name is not ``login_form`` you may
add additional ids (url last part) that are available to anonymous users.
::
from iw.rejectanonymous import addValidIds
...
addValidIds('some_image.png', 'my_login_form')
Adding valid subparts
---------------------
If you want to let anonymous users browse the pages of some folders, you need to
add valid subparts.
::
from iw.rejectanonymous import addValidSubparts
...
addValidSubparts('disclaimer', 'public_section')
Adding valid subparts prefixes
------------------------------
If you want to let anonymous users browse the pages of some folders with
specific prefixes, you need to add valid subpart prefixes.
::
from iw.rejectanonymous import addValidSubpartPrefixes
...
addValidSubpartPrefixes('public_')
Hiding viewlets
---------------
You may hide viewlets from the views of the site (login form, password reset
form). You need for this to add such lines in your site policy ZCML.
::
<browser:viewlet
name="original.viewlet.name"
for="iw.rejectanonymous.IPrivateSite"
manager="original.viewlet.manager.Interface"
class="original.viewlet.Class"
permission="cmf.SetOwnProperties"
/>
``name``
Keep the original viewlet name.
``for``
``iw.rejectanonymous.IPrivateSite`` the marker interface set to private sites
``manager``
Keep the original manager
``class``
Keep the original viewlet class
``permission``
Choose a permission that is not granted to an anonymous user but to anyone
else. ``cmf.SetOwnProperties`` is a good choice if your site has the standard
security policy.
See how we hide the ``plone.personal_bar`` and the ``plone.searchbox`` in the
``configure.zcml`` of this component.
Links
=====
Cheeseshop
http://pypi.python.org/pypi/iw.rejectanonymous
Git repository
https://github.com/collective/iw.rejectanonymous
Issue tracker
https://github.com/collective/iw.rejectanonymous/issues
Old SVN repository (up to 1.0.2)
https://svn.plone.org/svn/collective/iw.rejectanonymous
Contributors
============
* Bertrand Mathieu
* Thomas Desvenain
* Gilles Lenfant
* Elisabeth Leddy
Changes log
===========
1.2.7 (2023-05-08)
------------------
- Add ++webresource++ and ++plone++ to valid_subpart_prefixes (Plone 6)
[mamico]
1.2.6 (2022-05-11)
------------------
- Add @@ok to valid_ids
[ale-rt]
- Add custom.css to valid_ids (needed since Plone 5.2.2)
[ale-rt]
- Add ++unique++ to valid_subpart_prefixes (needed since Plone 5)
[ale-rt]
- Remove pdb
[mpeeters]
1.2.5 (2019-10-18)
------------------
- Add less-variables.js to valid ids for Plone 5.2 compliance.
Update classifiers [thomasdesvenain]
1.2.4 (2019-05-21)
------------------
- If plone.restapi is available, add auth related endpoints to valid ids.
[thomasdesvenain]
- Compliancy with plone.rest: allow anonymous OPTIONS requests
[ebrehault]
1.2.3 (2014-04-30)
------------------
- Modified coding style of getPortalLogoId function.
[vincentfretin]
- Make iw.rejectanonymous work in tests
[jaroel]
1.2.2 (2012-08-21)
------------------
- 4.2.1 Compatibility.
[thomasdesvenain]
1.2.1 (2012-08-16)
------------------
- Include cmf permissions zcml.
[thomasdesvenain]
1.2 (2012/5/16)
---------------
- ZCML duplicate viewlet setting
[eleddy]
- Typos in README.rst
[glenfant]
- Version in setup.py was a float
[glenfant]
1.1 (2012/5/12)
---------------
- Added doc for customization
[glenfant]
- Re enabled tests
[glenfant]
- Disabled some viewlets to anonymous and added doc for customization.
See https://github.com/collective/iw.rejectanonymous/issues/1
[glenfant]
- Added valid subpart prefixes such iw.rejectanonymous does not conflict with
plone.app.theming (Diazo)
[glenfant]
- Enable portal_kss subparts.
[thomasdesvenain]
- In plone 4, use of base_properties is sketchy and likely incompat.
Catch error if needed and use better default for logo.
[eleddy]
1.0.2 (2010-12-27)
------------------
- z3c.autoinclude awareness added so the ZCML slug does not need to be
explicitely added in buildout ``*.cfg``.
[glenfant]
- Add customization utilities and doc (add new enabled ids and subpaths)
[glenfant]
- Enable favicon.
[thomasdesvenain]
1.0.1 - 2010-10-08
------------------
- Enable password reset system.
[thomasdesvenain]
1.0.0 - 2008-02-11
------------------
- Initial release
[bmathieu]
Raw data
{
"_id": null,
"home_page": "https://svn.plone.org/svn/collective/iw.rejectanonymous",
"name": "iw.rejectanonymous",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "plone extranet",
"author": "Ingeniweb",
"author_email": "support@ingeniweb.com",
"download_url": "https://files.pythonhosted.org/packages/ad/39/5e679396087eec3094538c8587af282cbd99b512afd8e61c15f4363c79fb/iw.rejectanonymous-1.2.7.tar.gz",
"platform": null,
"description": "==================\niw.rejectanonymous\n==================\n\n\nWhat is iw.rejectanonymous ?\n============================\n\nThis package is made to reject unconditionnally anonymous users from a Plone\nsite, without any change in your security policy matrix or workflows. They\nshould get redirected by plone to login form. The basic use case is an extranet,\nwhere all visitors must be authenticated.\n\nWorks with\n==========\n\nPlone 3, 4, 5\n\nInstallation\n============\n\nAdd ``iw.rejectanonymous`` to the ``eggs`` option of your\n``plone.recipe.zope2instance`` part ::\n\n ...\n [instance]\n recipe = plone.recipe.zope2instance\n ...\n eggs =\n ...\n iw.rejectanonymous\n ...\n ...\n # The ZCML slug is no more required with Plone 3.3 and up\n zcml =\n ...\n iw.rejectanonymous\n ...\n\nRe-run buildout, then open the \"Security\" control panel of any Plone site of\nyour instance. A new **Private site** checkbox lets you (de)activate\n``iw.rejectanonymous``.\n\nCustomization\n=============\n\n``iw.rejectanonymous`` enables the publication of some resources to the\nanonymous user, more specifically to enable all media and resources required\nfrom the standard loging page and the password reset page.\n\nAdding valid ids\n----------------\n\nIf your customized logging page requires some specific images or your site\npolicy component provides a signup page which name is not ``login_form`` you may\nadd additional ids (url last part) that are available to anonymous users.\n\n::\n\n from iw.rejectanonymous import addValidIds\n ...\n addValidIds('some_image.png', 'my_login_form')\n\n\nAdding valid subparts\n---------------------\n\nIf you want to let anonymous users browse the pages of some folders, you need to\nadd valid subparts.\n\n::\n\n from iw.rejectanonymous import addValidSubparts\n ...\n addValidSubparts('disclaimer', 'public_section')\n\nAdding valid subparts prefixes\n------------------------------\n\nIf you want to let anonymous users browse the pages of some folders with\nspecific prefixes, you need to add valid subpart prefixes.\n\n::\n\n from iw.rejectanonymous import addValidSubpartPrefixes\n ...\n addValidSubpartPrefixes('public_')\n\nHiding viewlets\n---------------\n\nYou may hide viewlets from the views of the site (login form, password reset\nform). You need for this to add such lines in your site policy ZCML.\n\n::\n\n <browser:viewlet\n name=\"original.viewlet.name\"\n for=\"iw.rejectanonymous.IPrivateSite\"\n manager=\"original.viewlet.manager.Interface\"\n class=\"original.viewlet.Class\"\n permission=\"cmf.SetOwnProperties\"\n />\n\n``name``\n Keep the original viewlet name.\n\n``for``\n ``iw.rejectanonymous.IPrivateSite`` the marker interface set to private sites\n\n``manager``\n Keep the original manager\n\n``class``\n Keep the original viewlet class\n\n``permission``\n Choose a permission that is not granted to an anonymous user but to anyone\n else. ``cmf.SetOwnProperties`` is a good choice if your site has the standard\n security policy.\n\nSee how we hide the ``plone.personal_bar`` and the ``plone.searchbox`` in the\n``configure.zcml`` of this component.\n\nLinks\n=====\n\nCheeseshop\n http://pypi.python.org/pypi/iw.rejectanonymous\n\nGit repository\n https://github.com/collective/iw.rejectanonymous\n\nIssue tracker\n https://github.com/collective/iw.rejectanonymous/issues\n\nOld SVN repository (up to 1.0.2)\n https://svn.plone.org/svn/collective/iw.rejectanonymous\n\nContributors\n============\n\n* Bertrand Mathieu\n* Thomas Desvenain\n* Gilles Lenfant\n* Elisabeth Leddy\n\nChanges log\n===========\n\n1.2.7 (2023-05-08)\n------------------\n\n- Add ++webresource++ and ++plone++ to valid_subpart_prefixes (Plone 6)\n [mamico]\n\n1.2.6 (2022-05-11)\n------------------\n\n- Add @@ok to valid_ids\n [ale-rt]\n\n- Add custom.css to valid_ids (needed since Plone 5.2.2)\n [ale-rt]\n\n- Add ++unique++ to valid_subpart_prefixes (needed since Plone 5)\n [ale-rt]\n\n- Remove pdb\n [mpeeters]\n\n\n1.2.5 (2019-10-18)\n------------------\n\n- Add less-variables.js to valid ids for Plone 5.2 compliance.\n Update classifiers [thomasdesvenain]\n\n\n1.2.4 (2019-05-21)\n------------------\n\n- If plone.restapi is available, add auth related endpoints to valid ids.\n [thomasdesvenain]\n\n- Compliancy with plone.rest: allow anonymous OPTIONS requests\n [ebrehault]\n\n\n1.2.3 (2014-04-30)\n------------------\n\n- Modified coding style of getPortalLogoId function.\n [vincentfretin]\n\n- Make iw.rejectanonymous work in tests\n [jaroel]\n\n\n1.2.2 (2012-08-21)\n------------------\n\n- 4.2.1 Compatibility.\n [thomasdesvenain]\n\n\n1.2.1 (2012-08-16)\n------------------\n\n- Include cmf permissions zcml.\n [thomasdesvenain]\n\n\n1.2 (2012/5/16)\n---------------\n\n- ZCML duplicate viewlet setting\n [eleddy]\n\n- Typos in README.rst\n [glenfant]\n\n- Version in setup.py was a float\n [glenfant]\n\n\n1.1 (2012/5/12)\n---------------\n\n- Added doc for customization\n [glenfant]\n\n- Re enabled tests\n [glenfant]\n\n- Disabled some viewlets to anonymous and added doc for customization.\n See https://github.com/collective/iw.rejectanonymous/issues/1\n [glenfant]\n\n- Added valid subpart prefixes such iw.rejectanonymous does not conflict with\n plone.app.theming (Diazo)\n [glenfant]\n\n- Enable portal_kss subparts.\n [thomasdesvenain]\n\n- In plone 4, use of base_properties is sketchy and likely incompat.\n Catch error if needed and use better default for logo.\n [eleddy]\n\n\n1.0.2 (2010-12-27)\n------------------\n\n- z3c.autoinclude awareness added so the ZCML slug does not need to be\n explicitely added in buildout ``*.cfg``.\n [glenfant]\n\n- Add customization utilities and doc (add new enabled ids and subpaths)\n [glenfant]\n\n- Enable favicon.\n [thomasdesvenain]\n\n\n1.0.1 - 2010-10-08\n------------------\n\n- Enable password reset system.\n [thomasdesvenain]\n\n\n1.0.0 - 2008-02-11\n------------------\n\n- Initial release\n [bmathieu]\n",
"bugtrack_url": null,
"license": "GPL",
"summary": "Disallow access to a Plone site and its children if user is anonymous",
"version": "1.2.7",
"project_urls": {
"Homepage": "https://svn.plone.org/svn/collective/iw.rejectanonymous"
},
"split_keywords": [
"plone",
"extranet"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "ad395e679396087eec3094538c8587af282cbd99b512afd8e61c15f4363c79fb",
"md5": "5f8ff1b0402c9874717612b38d92f588",
"sha256": "241114cb9856269ec8bed950dbe9ab2990cabc114b57bf67a6df834ab03380a7"
},
"downloads": -1,
"filename": "iw.rejectanonymous-1.2.7.tar.gz",
"has_sig": false,
"md5_digest": "5f8ff1b0402c9874717612b38d92f588",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 12393,
"upload_time": "2023-05-08T08:42:19",
"upload_time_iso_8601": "2023-05-08T08:42:19.848724Z",
"url": "https://files.pythonhosted.org/packages/ad/39/5e679396087eec3094538c8587af282cbd99b512afd8e61c15f4363c79fb/iw.rejectanonymous-1.2.7.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-05-08 08:42:19",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "iw.rejectanonymous"
}