[pmg-devel] [RFC PATCH pmg-api/gui] add 'view images' checkbox to quarantine view

Dominik Csapak d.csapak at proxmox.com
Tue Feb 13 12:30:48 CET 2024


so that the user can control if images should be loaded, even
if the admin set that to true in the backend.

I'm not completely happy with the approach, since there is currently no
general way for us to see if the backend option was set, unless we'd
either weaken the permissions necesary to read the config or introduce
another api call that returns that info, both of which aren't optimal
imho.

Also we always show that checkbox now, since i didn't find a way to
detect if there are images in the mail or not unless we actually load it
with view images on and try to parse the email again in the frontend.
Which also sound not really clean.

For both reasons, sent as RFC.

pmg-api:

Dominik Csapak (1):
  api: quarantine: allow disabling images for content

 src/PMG/API2/Quarantine.pm | 11 +++++++++++
 1 file changed, 11 insertions(+)

pmg-gui:

Dominik Csapak (1):
  quarantine content: add checkbox for controlling image loading

 js/AttachmentQuarantine.js            |  4 +++-
 js/Makefile                           |  1 +
 js/SpamQuarantine.js                  |  4 +++-
 js/VirusQuarantine.js                 |  4 +++-
 js/controller/QuarantineController.js | 19 ++++++++++++++++---
 js/form/ViewImages.js                 | 17 +++++++++++++++++
 6 files changed, 43 insertions(+), 6 deletions(-)
 create mode 100644 js/form/ViewImages.js

-- 
2.30.2





More information about the pmg-devel mailing list