Skip to content

Commit 0d38591

Browse files
committed
fix: added support for pas.plugins.ldap
1 parent a218ec1 commit 0d38591

3 files changed

Lines changed: 35 additions & 2 deletions

File tree

Dockerfile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,13 @@ RUN uv venv $ZOPE_HOME
4040

4141
# Copy and install requirements
4242
COPY requirements.txt $ZOPE_HOME/
43-
RUN uv pip install --python=$ZOPE_HOME/bin/python -r $ZOPE_HOME/requirements.txt
43+
RUN uv pip install --python=$ZOPE_HOME/bin/python -r $ZOPE_HOME/requirements.txt && \
44+
# Patch PlonePAS to use Image.LANCZOS instead of Image.ANTIALIAS (removed in recent versions of Pillow)
45+
sed -i 's/Image\.ANTIALIAS/Image.LANCZOS/g' \
46+
$ZOPE_HOME/lib/python3.12/site-packages/Products/PlonePAS/config.py && \
47+
# Patch pas.plugins.ldap to close the <link>
48+
sed -i 's|></link>|/>|g' \
49+
$ZOPE_HOME/lib/python3.12/site-packages/pas/plugins/ldap/zmi/manage_plugin.pt
4450

4551
# Clone and install Products.Reportek from git
4652
RUN git clone --branch wip_migration_to_zope4_5_py3 --single-branch \
@@ -84,7 +90,6 @@ RUN apt-get update && \
8490
libldap2 \
8591
libmagic1 \
8692
libsasl2-2 \
87-
netcat-openbsd \
8893
poppler-utils \
8994
procps \
9095
wv && \
@@ -98,6 +103,7 @@ RUN groupadd -g ${ZOPE_GID} zope-www && \
98103
RUN mkdir -p /etc/ldap && \
99104
echo "TLS_CACERT /etc/ssl/certs/ca-certificates.crt" > /etc/ldap/ldap.conf && \
100105
echo "REFERRALS off" >> /etc/ldap/ldap.conf
106+
101107
# Copy installation from builder
102108
COPY --from=builder --chown=${ZOPE_UID}:${ZOPE_GID} $ZOPE_HOME $ZOPE_HOME
103109

requirements.txt

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ plone.memoize==3.0.4
100100
plone.portlets==3.0.3
101101
plone.protect==5.0.5
102102
plone.registry==2.0.2
103+
plone.session==4.0.6
104+
plone.i18n==4.0.7
105+
plone.supermodel==2.0.4
106+
Unidecode==1.3.8
103107

104108
# >=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=
105109
# ZODB Tools
@@ -126,6 +130,26 @@ Beaker==1.13.0
126130
# >=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=
127131
python-ldap==3.4.5
128132
dataflake.fakeldap==4.3
133+
pas.plugins.ldap==1.8.4
134+
Products.PlonePAS==6.0.8
135+
node.ext.ldap==2.0.0
136+
node.ext.ugm==2.0.0
137+
node==2.0.0
138+
odict==2.0.0
139+
plumber==2.0.0
140+
bda.cache==1.3.0
141+
passlib==1.7.4
142+
143+
# >=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=
144+
# YAFOWIL (for pas.plugins.ldap ZMI config UI, without yafowil.plone)
145+
# >=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=
146+
yafowil==4.0.0
147+
yafowil.yaml==3.0.0
148+
yafowil.bootstrap==2.0.0
149+
yafowil.widget.array==2.0.0
150+
yafowil.widget.dict==2.0.0
151+
webresource==2.0.0
152+
PyYAML==6.0.2
129153

130154
# >=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=
131155
# five.localsitemanager

src/site.zcml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
<!-- Products -->
99
<include package="Products.Reportek" />
1010

11+
<!-- LDAP authentication -->
12+
<include package="pas.plugins.ldap" />
13+
1114
<!-- Plone components -->
1215
<include package="plone.keyring" />
1316
<include package="plone.protect" />

0 commit comments

Comments
 (0)