-
Notifications
You must be signed in to change notification settings - Fork 47
Comparing changes
Open a pull request
base repository: postgres/pgweb
base: master
head repository: postgres/pgweb
compare: beta
- 9 commits
- 52 files changed
- 1 contributor
Commits on Jul 13, 2020
-
Ensure markdown fields cannot contain HTML or images
Since images can be used to drop things like tracking pixels, simply disallow them in all submissions.
Configuration menu - View commit details
-
Copy full SHA for 8fbc977 - Browse repository at this point
Copy the full SHA 8fbc977View commit details -
Re-work moderation of submitted items
This includes a number of new features: * Move some moderation functionality into shared places, so we don't keep re-inventing the wheel. * Implement three-state moderation, where the submitter can edit their item and then explicitly say "i'm done, please moderate this now". This is currently only implemented for News, but done in a reusable way. * Move moderation workflow to it's own set of URLs instead of overloading it on the general admin interface. Admin interface remains for editing things, but these are now separated out into separate things. * Do proper stylesheet clearing for moderation of markdown fields, using a dynamic sandboxed iframe, so it's not ruined by the /admin/ css. * Move moderation email notification into dedicated moderation code, thereby simplifying the admin subclassing we did which was in some places quite fragile. * Reset date of news postings to the date of their approval, when approved. This avoids some annoying ordering issues.
Configuration menu - View commit details
-
Copy full SHA for e4872d9 - Browse repository at this point
Copy the full SHA e4872d9View commit details -
Remove references to website migration
This migration happened 10 years ago, so if someone hasn't updated their records by now, they're not going to. We still allow and special-case the migrated data in the database in order not to delete history, but this removes the direct texts about it which take up unnecessary space and confuse some people.
Configuration menu - View commit details
-
Copy full SHA for 7b96690 - Browse repository at this point
Copy the full SHA 7b96690View commit details -
Implement permissions on news tags
This makes it possible to limit which organisations can use specific tags in news, and verify those as news is submitted. Administrators can, as always, override. In passing also add a sortkey field to newstags to make them, well, sortable.
Configuration menu - View commit details
-
Copy full SHA for 60f75e4 - Browse repository at this point
Copy the full SHA 60f75e4View commit details -
Simplify admin preview of emails
Use the python3 function to get the plaintext body of the email, instead of our own very limited one we had before.
Configuration menu - View commit details
-
Copy full SHA for 74d9a03 - Browse repository at this point
Copy the full SHA 74d9a03View commit details -
This filter takes a list of a,b,c,d and turns it into "a, b, c and d" or "a, b, c or d" depending on parameter given.
Configuration menu - View commit details
-
Copy full SHA for 5ea4c37 - Browse repository at this point
Copy the full SHA 5ea4c37View commit details -
Store project root directory in settings
This makes it possible to reference for example templates in relation to the root directory.
Configuration menu - View commit details
-
Copy full SHA for 4e71d1a - Browse repository at this point
Copy the full SHA 4e71d1aView commit details -
Teach send_simple_mail about sending HTML email
If a HTML body is specified, the plaintext and html bodies will be sent as a multipart/alternative MIME object. Also teach it to add attachments with Content-ID and overriding the Content-Disposition, to make it possible to reference images attached using cid: type URLs.
Configuration menu - View commit details
-
Copy full SHA for afe3676 - Browse repository at this point
Copy the full SHA afe3676View commit details -
Add support for sending out news as HTML email
When a news article is approved, it gets delivered as an email to the pgsql-announce mailinglist. It will render the markdown of the news article into a HTML part of the email, and include the markdown raw as the text part (for those unable or unwilling to read html mail). For each organisation, a mail template can be specified. Initially only two templates are supported, one "default" and one "pgproject" which is for official project news. The intention is *not* to provide generic templates, but we may want to extend this to certain related projects in the future *maybe* (such as regional NPOs). These templates are stored in templates/news/mail/*.html, and for each template *all* images found in templates/news/mail/img.<template>/ will be attached to the email. "Conditional image inclusion" currently not supported. To do CSS inlining on top of the markdown output, module pynliner is now required (available in the python3-pynliner package on Debian). A testing script is added as news_send_email.py in order to easier test out templates. This is *not* intended for production sending, so it will for example send unmoderated news. By sending, it adds it to the outgoing mailqueue in the system, so unless the cronjob is set up to send, nothing will happen until that is run manually. Support is included for tagged delivery using pglister, by directly mapping NewsTags to pglister tags.
Configuration menu - View commit details
-
Copy full SHA for ba9138f - Browse repository at this point
Copy the full SHA ba9138fView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff master...beta