Jonathan S. Katz [Wed, 7 Oct 2020 16:35:27 +0000 (12:35 -0400)]
Update the CoCC page change date
The previous commit forgot to do this. Also changed italicized
text to use "<em>" instead of "<i>", as "<i>" is deprecated
for italics.
Jonathan S. Katz [Wed, 7 Oct 2020 16:33:15 +0000 (12:33 -0400)]
Update Code of Conduct Commmittee Page
This is changed to reflect the committee for the 2020-2021 term.
This also changes the "Past Members" structure to list out
names and which terms they served.
Magnus Hagander [Wed, 7 Oct 2020 10:23:50 +0000 (12:23 +0200)]
Make the add manager field more clear in the organisation form
Make it clear that one should enter the email address, not username, to
add a manager, and that it should be an existing account.
Jonathan S. Katz [Sat, 3 Oct 2020 01:10:15 +0000 (21:10 -0400)]
Additional date translations for the PG13 presskits
These include:
- French
- Portuguese
- Polish
- Spanish
Jonathan S. Katz [Fri, 2 Oct 2020 02:39:59 +0000 (22:39 -0400)]
Add release date to the Japanese press release for PG13
Magnus Hagander [Tue, 29 Sep 2020 16:49:23 +0000 (18:49 +0200)]
Fix silly copy/paste mistake
Magnus Hagander [Mon, 28 Sep 2020 15:47:08 +0000 (17:47 +0200)]
Slugify event URLs
Magnus Hagander [Mon, 28 Sep 2020 15:54:43 +0000 (17:54 +0200)]
Update event archive footer links
* Turn main links into buttons
* Have a link from the archive back to the upcoming events, not just in
one direction.
* Write a paragraph about submitting events, similar to what was
recently done for news.
Magnus Hagander [Mon, 28 Sep 2020 15:54:28 +0000 (17:54 +0200)]
Fix silly typo
Magnus Hagander [Mon, 28 Sep 2020 15:47:37 +0000 (17:47 +0200)]
Remove template reference to eventblocks
This hasn't been used for a long time but was left over in a template.
It would render a link with a space in the title and missing the word
"events"...
Magnus Hagander [Mon, 28 Sep 2020 15:31:49 +0000 (17:31 +0200)]
Fix typo in comment
Magnus Hagander [Sat, 26 Sep 2020 20:08:44 +0000 (22:08 +0200)]
Prevent creating new accounts with email registered as secondary
If an email is already added as a secondary address to one account,
don't allow creating a new account using that email, unless it's
removed. Otherwise we end up with the same email address attached to
multiple different accounts, which can cause big problems downstream.
This should never have been allowed of course, but was missed when
support for secondary emails was added.
Magnus Hagander [Sat, 26 Sep 2020 15:50:44 +0000 (17:50 +0200)]
Fix password type identifications
Sha1's start with sha1$, not sha1_ (and this is not a SQL LIKE match).
And fix parameters when calling re.match in the unmatched case.
Magnus Hagander [Sat, 26 Sep 2020 14:59:23 +0000 (16:59 +0200)]
Fix merging of organisations
This has been broken since the OneToOne change in 2016 and since the
addition of pugs in 2013. Clearly not much used functionality.
Magnus Hagander [Sat, 26 Sep 2020 14:08:20 +0000 (16:08 +0200)]
Add direct links to news/events/services policy from submission forms
No link for Products because we don't currently have a policy for them.
Magnus Hagander [Sat, 26 Sep 2020 13:54:25 +0000 (15:54 +0200)]
Use a dash instead of empty string to indicate all tags
Seems there is somethign in the stack used in production that does not
like the use of an empty string between two slashes...
Magnus Hagander [Sat, 26 Sep 2020 13:54:07 +0000 (15:54 +0200)]
Remove hardcoded number, when we have a variable
Magnus Hagander [Sat, 26 Sep 2020 13:42:36 +0000 (15:42 +0200)]
Improve display of news tags
* Add a fa icon for tags to the buttons that are clicked for news tags,
to make it more clear what they are.
* Show a badge with the tag on each item when browsing the list.
* Change the buttons to be badges when viewing an individual item, and
move them to the top of the page instead of the bottom for consistency
with the listing.
In passing, add some spacing between the header and the text when
viewing a news item, because it looks a lot better.
Magnus Hagander [Sat, 26 Sep 2020 13:13:55 +0000 (15:13 +0200)]
Implement pagination for news archive
For now we do 10 items per page, but that's easy to adjust.
Paginate based on the date (so create an index on the date field to
simplify this), making page rendering and load a *lot* faster.
Magnus Hagander [Fri, 25 Sep 2020 11:51:35 +0000 (13:51 +0200)]
Update existing static news URLs to be slugified
Magnus Hagander [Fri, 25 Sep 2020 11:46:25 +0000 (13:46 +0200)]
Slugify URLs to news articles
Magnus Hagander [Fri, 25 Sep 2020 11:04:39 +0000 (13:04 +0200)]
Add a github action to validate syntax post-commit
While we don't use the github workflow for our development, it doesn't
hurt to get a post-commit notification when somebody forgot to validate
things pre-commit (using the hook we have). This hook also runs with
exactly the version of python/pycodestyle that we are using in
production, which might help someone.
Jonathan S. Katz [Thu, 24 Sep 2020 17:20:45 +0000 (13:20 -0400)]
Update package information on Windows / macOS pages
This now indicates the support for PostgreSQL 13.
Jonathan S. Katz [Thu, 24 Sep 2020 17:13:11 +0000 (13:13 -0400)]
Updates to the PostgreSQL 13 Russian press release translation
This fixes a few typos.
Magnus Hagander [Thu, 24 Sep 2020 13:27:40 +0000 (15:27 +0200)]
Fix release notes browser for 9.6 and earlier
At some point the code to drop down parts of the list broke for version
numbers that had a dot in it, meaning all versions prior to 10.
Unrelated to the release today. Fix is to just render 96 instead of
9.6..
Bug spotted by Stephen Frost
Jonathan S. Katz [Thu, 24 Sep 2020 13:04:12 +0000 (09:04 -0400)]
Fix a date on the relesae roadmap
Someone put 2020 instead of 2021.
Jonathan S. Katz [Wed, 23 Sep 2020 19:47:18 +0000 (15:47 -0400)]
PostgreSQL 13 release announcement
Yay!
Jonathan S. Katz [Wed, 23 Sep 2020 01:49:46 +0000 (21:49 -0400)]
Content updaes for PostgreSQL 13 release
An annual review of general content on the website, including adding
in new tidibts of information based on the new PostgreSQL release,
in this case for PostgreSQL 13.
Jonathan S. Katz [Sat, 19 Sep 2020 14:48:42 +0000 (10:48 -0400)]
PostgreSQL 13 Press Kit
Includes the press kit, translations of the press release, and
retires the PostgreSQL 12 press kit.
Jonathan S. Katz [Sat, 19 Sep 2020 14:58:30 +0000 (10:58 -0400)]
Update the FAQ
Amend, emend, and remove questions and answers to help keep up
with the modern times.
Jonathan S. Katz [Wed, 23 Sep 2020 16:09:34 +0000 (12:09 -0400)]
Fix language in unsupported documentation blurb
This removes any ambiguity that the blurb is making a reference
to other supported documentation.
Author: Daniel Gustafsson <daniel@yesql.se>
Jonathan S. Katz [Wed, 23 Sep 2020 16:07:39 +0000 (12:07 -0400)]
Fix typo on NetBSD page
Somehow, this was missed by the person who is typing out this
sentence.
Jonathan S. Katz [Wed, 23 Sep 2020 15:10:38 +0000 (11:10 -0400)]
Add NetBSD OS to list of downloadable packages
This also includes a change in the descruption of the BSD
family of packages to use the term "operating system", which
is the preferred language for describing the different BSD
options.
Author: Daniel Gustafsson <daniel@yesql.se>
Magnus Hagander [Wed, 23 Sep 2020 12:53:34 +0000 (14:53 +0200)]
Add rel="noopener" to all _blank target urls
Jonathan S. Katz [Tue, 22 Sep 2020 18:39:00 +0000 (14:39 -0400)]
Remove the cross-platform Linux installer
This installer is only supported up to PostgreSQL 10 and based on
the overall outbound traffic numbers to the installer, it makes
sense to remove it instead of carrying the overall maintenance
burden.
Jonathan S. Katz [Tue, 22 Sep 2020 18:34:09 +0000 (14:34 -0400)]
Update macOS downloads page
This provides a much more concise and accurate description of
what is on this page, as well as an ordering of the installers
based on the measured popularity of them.
Jonathan S. Katz [Tue, 22 Sep 2020 18:31:05 +0000 (14:31 -0400)]
Remove Debian backports from downloads page
There was little outbound traffic going to these URLs.
Jonathan S. Katz [Tue, 22 Sep 2020 18:10:51 +0000 (14:10 -0400)]
Remove references to BigSQL packages
The BigSQL packages are no longer publicly available, and
various parts of the BigSQL packages in the website had already
been commented out.
Jonathan S. Katz [Tue, 22 Sep 2020 18:13:13 +0000 (14:13 -0400)]
Remove "Build from Source" section on Linux package pages
The measured traffic patterns indicated that people wanting to
build from source were not getting to the source tarballs from
the Linux package pages, rather a) people on the package pages
wanted the pre-built packages and b) people who wanted source
code went directly to the source code from the main downloads
page.
Magnus Hagander [Fri, 18 Sep 2020 09:13:36 +0000 (11:13 +0200)]
Improve moderation messages somewhat
Change the subject to use the title of the object instead of the id, and
include a link to the moderation page. There's surely more to be done,
but this is a decent start.
Magnus Hagander [Fri, 18 Sep 2020 07:10:51 +0000 (09:10 +0200)]
Add admin function to initiate user password reset
This will trigger the same reset-your-password email as a user initiated
one, but it'll cut out one step and be a bit more user friendly...
Also, if this is done with an OAuth connected account, it will be
converted into a regular one (something we don't allow the end user to
do, for support reasons)
This also adds an entry to the user editor in the admin view that shows
if the user *is* an oauth user or not, or if they might have an old
"unmigrated" password.
Jonathan S. Katz [Thu, 17 Sep 2020 02:35:00 +0000 (22:35 -0400)]
PostgreSQL 13 Beta 1 updates
Magnus Hagander [Thu, 17 Sep 2020 12:37:58 +0000 (14:37 +0200)]
Properly verify owner of organisation in all forms
Magnus Hagander [Wed, 16 Sep 2020 17:58:30 +0000 (19:58 +0200)]
Remove form that no longer does anyting non-default
Magnus Hagander [Wed, 16 Sep 2020 17:56:07 +0000 (19:56 +0200)]
Add an inline to view and edit organisation emalis
The ability to do this was lost when we moved to multiple emails per
organisation since it's no longer in the main table, so add it back as
an inline.
Magnus Hagander [Wed, 16 Sep 2020 17:55:08 +0000 (19:55 +0200)]
Remove unused import
Magnus Hagander [Wed, 16 Sep 2020 17:48:51 +0000 (19:48 +0200)]
Add easy way to do xkey based purging of a template
Since we can purge based on the md5 hash of a template name, expose this
in the purge dialog so one doesn't have to manually calculate the hash
to use it.
Magnus Hagander [Wed, 16 Sep 2020 08:45:35 +0000 (10:45 +0200)]
Fix reject message subject on two-moderator items
Two-moderator items require only one moderator to be rejected or to be
sent back for more editing. In that case, don't log None as the other
moderator.
Magnus Hagander [Wed, 16 Sep 2020 08:45:03 +0000 (10:45 +0200)]
Don't send link to edit deleted submissions
Once a submission, like a news article, has been deleted, that link
would just become a 404 anyway.
Dave Page [Wed, 16 Sep 2020 10:44:31 +0000 (11:44 +0100)]
Exclude the pgAdmin repos from the FTP crawl.
Magnus Hagander [Sat, 12 Sep 2020 10:47:08 +0000 (12:47 +0200)]
Update jquery dependency to 3.4.1
Magnus Hagander [Sat, 12 Sep 2020 10:45:03 +0000 (12:45 +0200)]
Upgrade bootstrap and popper dependencies
Up to bootstrap 4.4.1 containing a lot of fixes.
While at it, put the version in the filenames, so we don't have to
cache-bust them every time we modify something unrelated, since they do
have well defined versions.
Magnus Hagander [Sat, 12 Sep 2020 10:43:38 +0000 (12:43 +0200)]
Remove unused dependency on jquery.matchHeight
Magnus Hagander [Sat, 12 Sep 2020 10:31:18 +0000 (12:31 +0200)]
Remove dynamic "docs" stylesheet
This was never used. And it was probably good that it wasn't, because if
it had it would've included both two copies of bootstrap in the page,
and also the bootstrap css map (as part of the css, and not as the map).
The docs pages these days use the same base stylesheet as the rest of
the site.
Magnus Hagander [Sat, 12 Sep 2020 10:28:15 +0000 (12:28 +0200)]
Remove CSS files from the previous generation of the site
Magnus Hagander [Sat, 12 Sep 2020 10:27:54 +0000 (12:27 +0200)]
Remove unused parts of bootstrap
Magnus Hagander [Sat, 12 Sep 2020 10:21:12 +0000 (12:21 +0200)]
Remove unused javascript
This is from the old version of the website, and hasn't been used for
quite some time.
Magnus Hagander [Sat, 12 Sep 2020 10:19:54 +0000 (12:19 +0200)]
Remove dependency on unversioned jquery-ui
We apparently had some old /admin/ code that used an old version of
jquery-ui, but AFAICT we don't have that anymore. So remove teh loading
of them and also the files, so we have just one version of jquery
around.
Magnus Hagander [Sat, 12 Sep 2020 10:00:40 +0000 (12:00 +0200)]
Ensure cache-buster URLs are used for all css and javascript
Most of this is in the admin section where it's less important, but it's
not all, and even there it's not zero importance.
Magnus Hagander [Thu, 10 Sep 2020 18:47:19 +0000 (20:47 +0200)]
Don't send notifications for new objects that are tri-state moderation
These will get a notification when they are explicitly submitted for
moderation, so there is no point in having a separate notice sent when
they're created, since there is nothing for the moderators to do at that
point.
Magnus Hagander [Thu, 10 Sep 2020 18:27:05 +0000 (20:27 +0200)]
Fix moderation preview of organisatoin managers
Magnus Hagander [Thu, 10 Sep 2020 18:11:09 +0000 (20:11 +0200)]
Fix invalid field name
Missed in a previous rename round.
Magnus Hagander [Thu, 10 Sep 2020 17:55:57 +0000 (19:55 +0200)]
Turn off usergenerated flags for email from our own addresses
News, docs and bugs are all sending from our own noreply addresses these
days, so they should not be flagged as usergenerated (flagging as
usergenerated will revent dkim signing, amongst other things)
Magnus Hagander [Thu, 10 Sep 2020 14:45:38 +0000 (16:45 +0200)]
Don't create duplicate headers in outgoing email
The python libraries will *append* a header if it's just added again,
which would cause the news to go out with two date headers. Oops. So
instead check if each header is present and in that case replace it
rather than appending.
Magnus Hagander [Thu, 10 Sep 2020 12:52:41 +0000 (14:52 +0200)]
Track multiple email addresses for an organisation
This allows organisation managers to add more than one email address to
an organisation, and use this for sending news from. Sending news is the
only thing that the email field is used for at this point. Adding an
email will trigger a validation email sent to the address with a token
to confirm it, so that we can actually trust the emails.
Remove the previous registered emails on organisations. These addresses
were never validated and thus cannot really be trusted, so it's better
to remove them cleanly than to migrate them into the new system and be
uncertain.
Finally, in passing, remove the phone field on organisations. We've
never used that for anything and there's not really any point in
collecting the data.
Magnus Hagander [Thu, 10 Sep 2020 12:52:41 +0000 (14:52 +0200)]
Send moderation notices to organisation admins
Instead of tracking one single (non-verified!) email address for
organisations only to send notificationsn to, send the notifications to
all managers. This is relevant because all managers are in a position to
act upon them (and for example fix a posting).
Magnus Hagander [Thu, 10 Sep 2020 12:52:41 +0000 (14:52 +0200)]
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.
While at it, update the moderation preview forms to preview news items
using the HTML template for the email (while leaving other types of
items previewing without a particular stylesheet).
Magnus Hagander [Thu, 10 Sep 2020 12:52:41 +0000 (14:52 +0200)]
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.
Magnus Hagander [Thu, 10 Sep 2020 12:52:41 +0000 (14:52 +0200)]
Store project root directory in settings
This makes it possible to reference for example templates in relation to
the root directory.
Magnus Hagander [Thu, 10 Sep 2020 12:52:41 +0000 (14:52 +0200)]
Add templatefilter joinandor
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.
Magnus Hagander [Thu, 10 Sep 2020 12:52:41 +0000 (14:52 +0200)]
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.
Magnus Hagander [Thu, 10 Sep 2020 12:52:41 +0000 (14:52 +0200)]
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.
Magnus Hagander [Thu, 10 Sep 2020 12:52:41 +0000 (14:52 +0200)]
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.
Magnus Hagander [Thu, 10 Sep 2020 12:52:41 +0000 (14:52 +0200)]
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.
Magnus Hagander [Mon, 7 Sep 2020 14:02:03 +0000 (16:02 +0200)]
Prefetch managers when viewing the organistion list
This removes a few thousand SQL queries and speeds up the page "a bit"
Magnus Hagander [Tue, 1 Sep 2020 09:27:32 +0000 (11:27 +0200)]
Remove dead links
Two of our international community sites have failed to resolve or reply
for a while now, so remove the links. Should they reappear we can always
add them back.
Magnus Hagander [Mon, 31 Aug 2020 09:56:33 +0000 (11:56 +0200)]
Update more links to be https instead of http
Magnus Hagander [Mon, 31 Aug 2020 08:40:41 +0000 (10:40 +0200)]
Update translated docs links to be https
The French docs had one link in http and one in https as noted by
Lætitia. In passing I also adjusted the japanese to link to the https
version directly as one is available. The remaining one (Chinese) does
not appear to have a responding https server, so that one is left as
http.
Jonathan S. Katz [Sun, 30 Aug 2020 22:00:07 +0000 (18:00 -0400)]
Ensure "help_text" segments line up on feature matrix model
There was a subtle difference between the migration and the
model itself, which was leading to a migration warning, even
though nothing about the help_text is persistent in an actual
database.
Jonathan S. Katz [Sun, 30 Aug 2020 20:47:12 +0000 (16:47 -0400)]
Create proper URL check for feature matrix entries
40d6891c had created a false illusion of working, which can
certainly be blamed on the patch author. That said, instead
of trying to work around what the standard Django filters
provide, it is more prudent to create a "URL checking"
function for the feature matrix descriptions. This can be
used both for the "featurelink" generation, as well as the
new check we make to get the stated goal of
40d6891c, i.e.
provide a clickable URL when that is the only content of a
feature description.
Jonathan S. Katz [Sun, 30 Aug 2020 20:36:52 +0000 (16:36 -0400)]
Create clickable links on feature details pages
There are many feature matrix details pages that would have
just a plain URL that was not clickable, either due to someone
accessing a feature matrix details page directly, or due to an
old details pages with a description being converted to just a
link.
This ensures that such pages can have a clickable link to attempt
to create a better user experience. Doing so from the Django
template filters is a bit roundabout, but it does get the desired
effect.
Jonathan S. Katz [Sun, 30 Aug 2020 19:46:50 +0000 (15:46 -0400)]
Add Markdown support to feature matrix descriptions
This will make it possible to allow for links in longer
descriptions for particular features. This also adds some
help text describing how the feature matrix details field
works, as I remember I was originally caught by surprise that
one could provide a direct link to something.
Jonathan S. Katz [Sun, 30 Aug 2020 19:13:17 +0000 (15:13 -0400)]
Add v13 to feature matrix
This is part of the annual tradition of updating the
feature matrix.
Magnus Hagander [Sun, 30 Aug 2020 15:31:57 +0000 (17:31 +0200)]
Ensure news and events archive doesn't generate thousands of queries
While there is Varnish to take the edge off it, this is just too
ineffective to leave around :)
Magnus Hagander [Sun, 30 Aug 2020 15:29:30 +0000 (17:29 +0200)]
Strip html tags in event archive
We were already doing this for news, but for some reason neglected to do
so for events, which made for some pretty messed up formatting in the
archives now and then. We should treat news and events the same...
Magnus Hagander [Tue, 25 Aug 2020 11:23:38 +0000 (13:23 +0200)]
Update requirements.txt to match current production env
Magnus Hagander [Tue, 25 Aug 2020 11:22:05 +0000 (13:22 +0200)]
Fix cvss links in admin interface
Jonathan S. Katz [Mon, 24 Aug 2020 13:05:10 +0000 (09:05 -0400)]
Update URL for "PostgreSQL for Beginners" book
The source page for this had changed with the publication of
another book in this list.
Author: Pavel Luzanov <p.luzanov@postgrespro.ru>
Jonathan S. Katz [Fri, 21 Aug 2020 17:46:24 +0000 (13:46 -0400)]
Add "PostgreSQL: The First Experience" book
Author: Pavel Luzanov <p.luzanov@postgrespro.ru>
Magnus Hagander [Thu, 20 Aug 2020 12:59:10 +0000 (14:59 +0200)]
Add a missing dependency in migration
Required to pass installation on empty system.
Stephen Frost [Tue, 18 Aug 2020 15:37:40 +0000 (11:37 -0400)]
Update the CoC policy, per CoC Committee/Core
Minor updates to the specifics regarding how the committee membership is
managed and providing for a transistion period when the membership
changes.
Per direction of the CoC Committee, with Core approval.
Dave Page [Mon, 17 Aug 2020 08:30:06 +0000 (09:30 +0100)]
Pass the -y flag to apt in the install scripts.
Per Lætitia Avrot.
Dave Page [Mon, 17 Aug 2020 08:27:12 +0000 (09:27 +0100)]
Pass the -y flag to yum/dnf when generating install scripts.
Per Lætitia Avrot.
Jonathan S. Katz [Thu, 13 Aug 2020 12:05:24 +0000 (08:05 -0400)]
2020-08-13 cumulative update and PostgreSQL 13 Beta 3
Magnus Hagander [Thu, 13 Aug 2020 12:11:52 +0000 (14:11 +0200)]
Reference OLD instead of NEW in trigger
The trigger is used for both UPDATE and DELETE, but in DELETE there is
no value in OLD.
Given that it only references the user_id field and this field cannot
change, we can just use OLD in both the UPDATE and DELETE case.
Back-patching in existing migration since it hasn't really been deployed
anywhere yet.
Magnus Hagander [Wed, 12 Aug 2020 15:52:52 +0000 (17:52 +0200)]
Add explicit links to git history for policies
We don't do this for all pages, but specifically for policies that
already included the "Last update", it's friendly to have a link to the
full set of changes.
We still lave the "Last updated" field as manually updated, because we
don't want to update that one if we just fix a typo or similar, it
should be reserved for when we make acstual content updates to a policy.
This creates and uses a specific template tag to automate the creation
of the links (that can of course be used elsewhere as well if needed).
Magnus Hagander [Wed, 12 Aug 2020 15:30:46 +0000 (17:30 +0200)]
Use an include to list the yearly coc reportts
For some reason this was done with copy/paste before, but an include
seems much better.
Magnus Hagander [Wed, 12 Aug 2020 15:17:32 +0000 (17:17 +0200)]
Simplify transaction handling in the changetracker daemon
Previously we used a combination of optimistic concurrency control
(by DELETEing with both the id and the date included in the WHERE
clause) and REPEATABLE READ transactions. This would create
serialization conflicts when completely unnecessary. Since in this case
it doesn't matter if we happen to push the same thing twice, switch
completely to optimistic concurrency control. That gets rid of having to
deal with serialization issues.
Magnus Hagander [Wed, 12 Aug 2020 15:14:19 +0000 (17:14 +0200)]
Update nagios monitor to check for duplicated email addresses
This should not be possible if things are done through the appropriate
interfaces, and those interfaces are bug-free (right..). But really bad
things can probably happen if they don't, so put a monitor in place to
check for it.
This also adds a view in the db that shows all registered email
addresses and their accounts, regardless of if it's primary or secondary
address. This is used by the nagios check but can of course be useful to
manual checks as well.
Magnus Hagander [Wed, 12 Aug 2020 10:45:33 +0000 (12:45 +0200)]
Tweak mediawiki to handle NULL in email fields
It really shouldn't exist, but we clearly have cases where the community
auth plugin sets the email to NULL, so we need to handle that case when
looking for what to update.