From 66ee11c03d53aa3c70ca2718da6aed15f14439c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9?= Date: Fri, 17 Aug 2018 21:42:31 +0200 Subject: [PATCH] [SOGo] Disable display of ACL "any/authenticated" by default [Dovecot] Disable "any" ACL by default [SOGo] Might fix theme switching (yes, again) --- data/Dockerfiles/sogo/Dockerfile | 3 ++- data/Dockerfiles/sogo/acl.diff | 11 +++++++++++ data/Dockerfiles/sogo/bootstrap-sogo.sh | 23 +++++++++++++++++++++++ 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 data/Dockerfiles/sogo/acl.diff diff --git a/data/Dockerfiles/sogo/Dockerfile b/data/Dockerfiles/sogo/Dockerfile index 7765f08c..30a06d24 100644 --- a/data/Dockerfiles/sogo/Dockerfile +++ b/data/Dockerfiles/sogo/Dockerfile @@ -20,6 +20,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ netcat \ psmisc \ wget \ + patch \ && rm -rf /var/lib/apt/lists/* \ && dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')" \ && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch" \ @@ -45,7 +46,7 @@ COPY supervisord.conf /etc/supervisor/supervisord.conf COPY theme-blue.js /usr/lib/GNUstep/SOGo/WebServerResources/js/theme-blue.js COPY theme-blue.css /usr/lib/GNUstep/SOGo/WebServerResources/css/theme-default.css COPY sogo-full.svg /usr/lib/GNUstep/SOGo/WebServerResources/img/sogo-full.svg - +COPY acl.diff /acl.diff CMD exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf RUN rm -rf /tmp/* /var/tmp/* diff --git a/data/Dockerfiles/sogo/acl.diff b/data/Dockerfiles/sogo/acl.diff new file mode 100644 index 00000000..51370038 --- /dev/null +++ b/data/Dockerfiles/sogo/acl.diff @@ -0,0 +1,11 @@ +--- /usr/lib/GNUstep/SOGo/Templates/UIxAclEditor.wox 2018-08-17 18:29:57.987504204 +0200 ++++ /usr/lib/GNUstep/SOGo/Templates/UIxAclEditor.wox 2018-08-17 18:29:35.918291298 +0200 +@@ -46,7 +46,7 @@ + + + +- + diff --git a/data/Dockerfiles/sogo/bootstrap-sogo.sh b/data/Dockerfiles/sogo/bootstrap-sogo.sh index de995c22..46d8ec6c 100755 --- a/data/Dockerfiles/sogo/bootstrap-sogo.sh +++ b/data/Dockerfiles/sogo/bootstrap-sogo.sh @@ -172,4 +172,27 @@ sed -i \ /usr/lib/GNUstep/SOGo/WebServerResources/js/Common/Common.app.js \ /usr/lib/GNUstep/SOGo/WebServerResources/js/Common.js +sed -i \ + -e 's/default: "900"/default: "700"/g' \ + -e 's/default: "500"/default: "700"/g' \ + -e 's/"hue-1": "400"/"hue-1": "500"/g' \ + -e 's/"hue-1": "A100"/"hue-1": "500"/g' \ + -e 's/"hue-2": "800"/"hue-2": "700"/g' \ + -e 's/"hue-2": "300"/"hue-2": "700"/g' \ + -e 's/"hue-3": "A700"/"hue-3": "A200"/' \ + -e 's/default:"900"/default:"700"/g' \ + -e 's/default:"500"/default:"700"/g' \ + -e 's/"hue-1":"400"/"hue-1":"500"/g' \ + -e 's/"hue-1":"A100"/"hue-1":"500"/g' \ + -e 's/"hue-2":"800"/"hue-2":"700"/g' \ + -e 's/"hue-2":"300"/"hue-2":"700"/g' \ + -e 's/"hue-3":"A700"/"hue-3":"A200"/' \ + /usr/lib/GNUstep/SOGo/WebServerResources/js/Common/Common.app.js \ + /usr/lib/GNUstep/SOGo/WebServerResources/js/Common.js + +# Patch ACLs (comment this out to enable any or authenticated targets for ACL) +if patch -sfN --dry-run /usr/lib/GNUstep/SOGo/Templates/UIxAclEditor.wox < /acl.diff > /dev/null; then + patch /usr/lib/GNUstep/SOGo/Templates/UIxAclEditor.wox < /acl.diff; +fi + exec gosu sogo /usr/sbin/sogod