Wykres commitów

1598 Commity (b5835dd8626fe50eea5ca00fa48f9c9ab3c58bd7)

Autor SHA1 Wiadomość Data
Matt Westcott c3abf40ea5 Add release notes / changelog section for 2.13 2021-01-19 09:47:31 +00:00
Matt Westcott fe51d1c6ed Changelog entry for #6409 2021-01-18 17:59:43 +00:00
Michael Brown cadb5456c0 Apply scss styling to collection_choice_field (#6683) 2021-01-18 17:06:29 +00:00
Matt Westcott c0c7f1bd5d Release note for #6635 2021-01-18 15:11:46 +00:00
Andy Babic f905e705da Add Page.specific_deferred (#6661) 2021-01-18 13:25:55 +00:00
Will Giddens 2da410b2e0 Add combined index for Postgres search backend. (#6548)
Fixes #6546
2021-01-18 12:19:18 +00:00
David Beitey 3a5b7255ad Change UniqueConstraint for wider database support (#6607)
This fixes #6393 by modifying the constraint to use an IN condition
which supports both Postgres and SQL Server. Previously, the `|` (OR)
condition was only supported by Postgres because SQL Server only
supports AND conditions.

The implementation follows suggestions from @gasman in
https://github.com/wagtail/wagtail/issues/6393#issuecomment-732161057:

* Migration 0050 is modified to not break on SQL Server
* Added migration 0060 to add or replace the constraint

Additionally, this allows for and documents a `DATABASE_DRIVER` env
variable to be set for testing, to allow a different SQL Server driver
(e.g. FreeTDS on Mac/Linux); and adds the specific `host_is_server`
option for FreeTDS (won't affect SQL Server Native Client on CI).
2021-01-18 11:52:52 +00:00
Matt Westcott 758fa2b863 Release note for #6654/#6658 2021-01-15 20:20:00 +00:00
Robert Rollins d18ffb0233 Implemented a 'choose' permission for Images and Documents (#6466)
This PR adds the 'choose' permission discussed in #4488. It limits Image and Document choosers to showing only those Collections (and their contents) for which the current user has the Choose permission.

It grants Choose permissions to the Root Collection to every existing Group that has the "Can access Wagtail admin" perm, via data migration. So there will be no change in behavior unless the user goes in and alters the Choose perms for their site's groups.

This PR has no effect on anything except choosers. The Image and Document index pages are still controlled solely by the 'add' and 'change' permissions, as those are only accessible by users who have those permissions in the first place. This means that it's now possible to configure a Group to allow its members to choose images from existing Collections when editing pages, *without* them being able to edit said images or add new ones.
2021-01-05 12:23:49 +00:00
Matt Westcott 09fb115a2d Catch JSON decode errors in oembed responses (#6648)
Fixes #6646 - for private videos, Youtube's oembed endpoint returns the text "Forbidden", but with a 200 status code, which fails JSON decoding.
2020-12-18 15:59:51 +00:00
Vadim Karpenko 4cfd303db9 Check action menu items (pages and snippets) for None before using (#6566) 2020-12-15 19:17:53 +00:00
Matt Westcott 3768483352 Fill in release date for 2.11.3 2020-12-10 17:59:21 +00:00
Matt Westcott 49136ea4a5 Prevent error on publish check in create_log_entries_from_revisions (#6628)
Fixes #6498
2020-12-10 17:34:57 +00:00
Matt Westcott 971bdc0799 Fix combining locale/translation_of API filters with search (#6627)
Fixes #6626
2020-12-10 16:26:41 +00:00
Matt Westcott f4702646bd Release note for #6572 2020-12-09 16:28:20 +00:00
Dan Braghis 05587e0d84 Allow customising image/document admin forms (#6462) 2020-12-09 12:35:19 +00:00
Andreas Nüßlein 6a7a5756d9 Add string representation to image Format() (#6608)
when checking on the currently registered Formats, e.g. with `get_image_formats()` the output is now easier to read.
2020-12-09 12:16:26 +00:00
Matt Westcott 8d9e864581 Release note for #6485 2020-12-08 18:23:56 +00:00
Matt Westcott 9a953fd93c Additional release notes for #6559 2020-12-08 16:00:47 +00:00
Scott Cranfill bba831d2cf
Update pagination icons to use SVGs (#6573)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2020-12-04 17:03:50 +00:00
Alex Sa 01d3854696
Add collection_id param to document chooser pagination handling. Fix #5913 (#6529)
Make sure document chooser pagination preserves the selected collection when moving between pages

Co-authored-by: Alexander Sajzew <a.sajzew@alexsa.de>
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2020-12-02 12:41:37 +00:00
Karran Besen 65d0cdf55f
Fix breadcrumb margin overlapping burger menu. Fix #6590 (#6597)
Stop menu icon overlapping the breadcrumb on small viewport widths in page editor

Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2020-12-02 12:05:13 +00:00
Matt Westcott 56a92d466e Fill in release date for 2.11.2
Conflicts:
	CHANGELOG.txt
2020-11-17 15:44:24 +00:00
Cynthia Kiser 28cee081b2 Add custom oEmbed finders for Facebook and Instagram (#6550)
Move code from https://www.codista.com/en/blog/wagtail-instagram-new-oembed-api/ into core

Add custom oembed finder for Facebook

Apply suggestions from @originell's code review

Co-authored-by: Luis Nell <luis.nell@codista.com>

FIXUP More places to change the exception name (and a linter fix)

Extend Instagram/Facebook tests to check HTTP request

Add documentation for omitscript parameter
2020-11-17 15:06:24 +00:00
Matt Westcott 9ef3685efc Allow deleting the default locale (#6553)
Fixes #6533
2020-11-17 11:25:52 +00:00
Matt Westcott 414571cc99 Release note for #6544 2020-11-16 17:15:32 +00:00
Jérôme Lebleu f88e6f91ff Fix header icon name in settings' edit view (#6554) 2020-11-16 15:02:19 +00:00
Matt Westcott 236632d815
Handle get_supported_language_variant returning a language variant not in LANGUAGES (#6547)
* Handle get_supported_language_variant returning a language variant not in LANGUAGES

Fixes #6539

* Handle LANGUAGE_CODE that isn't in LANGUAGES

* Release note for #6547
2020-11-16 11:51:32 +00:00
Matt Westcott a888d3383c Gracefully handle missing Locale records on Locale.get_active and .localized (#6549)
Fixes #6540
There are various code paths where Page.localized and similar can be called even when WAGTAIL_I18N_ENABLED is False, and since it's entirely likely that hand-rolled i18n mechanisms and ad-hoc configuration changes (e.g changing LANGUAGE_CODE) will break the Locale model's assumptions about how things are meant to work, we need to provide sensible fallback behaviour for when the current active locale, or the default locale as per LANGUAGE_CODE, does not have a corresponding Locale record:

* Locale.get_active() will fall back on the default LANGUAGE_CODE locale, or raise Locale.DoesNotExist if that one does not exist either;
* TranslatableMixin.localized (along with Page.localized and Page.localized_draft) will handle a missing Locale record by falling back on the default LANGUAGE_CODE locale, or failing that, returning self.
2020-11-16 10:31:01 +00:00
Karl Hobley 792a9d272b Fetch the depth field of page translations on the edit view
This field is used in the `.can_edit()` permission check
2020-11-13 17:14:22 +00:00
Matt Westcott be45cee2aa Fill in release date for 2.11.1 2020-11-06 17:30:55 +00:00
Matt Westcott f378f48e14 Prevent errors on get_url_parts when a non-content-language locale is active (#6521)
Fixes #6510 and #6511

Catch the LookupError from get_supported_content_language_variant so that if the active language is not one that is recognised as a content language, the URL prefix will be left unchanged from the page's reported locale.

Additionally, skip the `translation.override` when WAGTAIL_I18N_ENABLED is false; this accounts for the fact that existing sites may have used alternative / custom i18n implementations involving i18n_patterns, and on these sites we can't rely on the page's locale field to be meaningful. That way, we restore the pre-2.11 behaviour: if the existing i18n code was using some kind of wrapper around the get_url_parts call, then that will work again; and if not, the URL will reflect the current active locale, which is no worse than before.
2020-11-06 17:04:18 +00:00
Matt Westcott 3c984b9871 Avoid circular import between wagtail.admin.auth and custom user models (#6522)
Fixes #6518

If the models.py containing a custom user model directly or indirectly imports wagtail.admin.auth, this causes a circular dependency because wagtail.admin.auth attempts to import django.contrib.auth.views, which in turn depends on the custom user model. Fix this by moving the django.contrib.auth.views import inside reject_request.
2020-11-06 09:35:21 +00:00
Sævar Öfjörð Magnússon a541510417 Additional safeguard to check if a cached site is from an older version of Wagtail (#6515) 2020-11-04 12:22:43 +00:00
Matt Westcott 14f1d8d59a Add release notes section for 2.11.1
Conflicts:
	CHANGELOG.txt
	docs/releases/index.rst
2020-11-04 10:45:15 +00:00
Matt Westcott 39f953eca3 Release note for Python 3.9 support (#6508) 2020-11-03 11:58:01 +00:00
Matt Westcott 330f0dde15 Fill in release date for 2.11 2020-11-02 15:06:22 +00:00
Matt Westcott 94f6b755b2 Version bump to start work on 2.12 2020-10-23 16:55:21 +01:00
Karl Hobley 6234023f39
Changelog / relase note for internationalisation (#6492)
* Changelog / relase note for internationalisation

* Apply suggestions from code review

Co-authored-by: Matt Westcott <matthew@torchbox.com>
2020-10-23 14:26:44 +01:00
LB Johnston f6dce3d6df Update changelog entries for @samgans 2020-10-22 19:46:07 +10:00
Karl Hobley f0ce1f4775 Replace pushPage/popPage with more flexible gotoPage method
- page explorer
2020-10-22 19:45:34 +10:00
Anton Zhyltsou 41eccc72bc Consistently redirect to admin home on permission denied
* Catch PermissionDenied exceptions in require_admin_access decorator
* Fixed permissions errors for the documents views
* Added permissions tests for the images views
* Fixed some tests for limited permissions
* fixes #6352
2020-10-22 00:10:24 +10:00
Coen van der Kamp fd5e6b657f Switch breadcrumb icons to SVG 2020-10-21 23:57:09 +10:00
Matt Westcott accdbd2174 Mark 2.11 as an LTS release 2020-10-21 12:14:04 +01:00
meghanabhange 3a2f2a6ea3 form_classname meta in FieldBlock (#6470) 2020-10-20 19:17:54 +01:00
Sævar Öfjörð Magnússon b7643f869d Fix spacing around the privacy indicator panel. (#6454) 2020-10-20 13:07:03 +01:00
Andy Babic cbf65ba645 Release notes for #6386 2020-10-19 21:37:28 +01:00
Matt Westcott 8e47b27ffc Fixed -> Fix 2020-10-19 21:31:32 +01:00
Jim Jazwiecki 024717fe0f add support for natural keys to group collection permissions for use in fixtures (#6211) 2020-10-19 21:31:10 +01:00
Matt Westcott 27432e6c3f Release note for #5976 2020-10-18 15:31:56 +01:00