Skip to content

Commit

Permalink
Merge branch 'main' into us_52023_controlpanel_ASL
Browse files Browse the repository at this point in the history
  • Loading branch information
cekk authored Aug 14, 2024
2 parents f79a3bb + 94729eb commit fef5852
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 28 deletions.
3 changes: 3 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@ Changelog
1.0a1 (unreleased)
------------------

- rejectanonymous (usato ad esempio per /admin nel buildout, vedi anche desing.plone.policy)
[mamico]

- Initial release.
[]
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"collective.volto.enhancedlinks",
"collective.feedback",
"collective.volto.slimheader",
"iw.rejectanonymous",
],
extras_require={
"test": [
Expand Down
7 changes: 7 additions & 0 deletions src/iosanita/policy/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,11 @@

<!-- -*- extra stuff goes here -*- -->

<subscriber
for="Products.CMFCore.interfaces.ISiteRoot
zope.traversing.interfaces.IBeforeTraverseEvent"
handler=".rejectanonymous.insertRejectAnonymousHook"
/>


</configure>
8 changes: 8 additions & 0 deletions src/iosanita/policy/rejectanonymous.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# -*- coding: utf-8 -*-
from iw.rejectanonymous import rejectAnonymous


def insertRejectAnonymousHook(portal, event):
"""force authentication for request with X-ForceAuth header"""
if event.request.getHeader("X-ForceAuth"):
event.request.post_traverse(rejectAnonymous, (portal, event.request))
29 changes: 1 addition & 28 deletions test_plone60.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ build = 1.2.1
cmarkgfm = 2024.1.14
collective.geolocationbehavior = 1.7.2
collective.honeypot = 2.1
collective.venue = 4.1
coverage = 7.5.4
flake8 = 6.1.0
geographiclib = 2.0
Expand Down Expand Up @@ -54,10 +53,6 @@ backports.tarfile = 1.2.0
# plone.recipe.codeanalysis==3.0.1
check-manifest = 0.49

# Required by:
# collective.venue==4.1
collective.address = 1.6

# Required by:
# iosanita.policy==1.0.0.dev0
collective.feedback = 1.1.3
Expand Down Expand Up @@ -136,26 +131,4 @@ souper.plone = 1.3.1
# iosanita.contenttypes==2.0.0.dev0
# iosanita.policy==1.0.0.dev0
# redturtle.volto==5.5.0
z3c.jbot = 2.0

# Added by buildout at 2024-07-31 13:03:47.206767

# Required by:
# redturtle.bandi==1.4.5
collective.tiles.collection = 2.1.1

# Required by:
# iosanita.policy==1.0.0.dev0
collective.volto.slimheader = 1.0.1

# Required by:
# collective.tiles.collection==2.1.1
plone.app.tiles = 4.0.1

# Required by:
# iosanita.contenttypes==2.0.0.dev0
redturtle.bandi = 1.4.5

# Required by:
# check-manifest==0.49
tomli = 2.0.1
z3c.jbot = 2.0

0 comments on commit fef5852

Please sign in to comment.