Matt Westcott
e18f5abc35
Refactor ReportView to expose a get_filtered_queryset method
...
We'll need to override this for a report view that combines multiple querysets with union(), because you need to filter the subqueries separately
2021-10-01 17:03:28 +01:00
Matt Westcott
f3069fb954
Add transactions around logged actions
2021-10-01 16:30:05 +01:00
Matt Westcott
6cb463dd41
Document the new 'log' method
2021-10-01 16:30:05 +01:00
Matt Westcott
4eb539b901
Add logging for users
2021-10-01 16:30:05 +01:00
Matt Westcott
6f2fee869d
Add logging for site settings
2021-10-01 16:30:05 +01:00
Matt Westcott
bf663cd568
Add logging for search promotions
2021-10-01 16:30:05 +01:00
Matt Westcott
9839adc002
Prevent logging actions for instances with null primary keys
...
It's a common gotcha when logging delete actions, and screws up reporting afterwards because the generic FK in ModelLogEntry ends up storing it as the string 'None'
2021-10-01 16:30:05 +01:00
Matt Westcott
759234e3d2
Add logging to redirects
2021-10-01 16:30:05 +01:00
Matt Westcott
ba825e2346
Add logging to generic model views
2021-10-01 16:30:05 +01:00
Matt Westcott
23d6530761
Add logging to ModelAdmin
2021-10-01 16:30:05 +01:00
Matt Westcott
fc62c532aa
Add uuid to track log entries from the same log context / user action
2021-10-01 16:30:05 +01:00
Matt Westcott
1ab7ef91df
Add db index to log entry timestamp
...
Makes a small but observable performance improvement to the audit log report
2021-10-01 16:30:05 +01:00
Matt Westcott
b020a6e785
Use asgiref for threadlocals if available
2021-10-01 16:30:05 +01:00
Matt Westcott
4126aff021
Set up a LogContext for the user on all admin views
2021-10-01 16:30:05 +01:00
Matt Westcott
1a0e53ba09
Add context manager to keep track of current user when logging
...
Any `log` calls within a `with LogContext(user=request.user):` block can omit the user argument and have it picked up from the context instead.
2021-10-01 16:30:05 +01:00
Matt Westcott
c7548c3a00
Add logging to snippet views
2021-10-01 16:30:05 +01:00
Matt Westcott
64434950b9
Switch page model logging to use generic 'log' function
2021-10-01 16:30:05 +01:00
Matt Westcott
6e09e4b250
Have LogActionRegistry keep track of which log models are used by which object types
2021-10-01 16:30:05 +01:00
Matt Westcott
0bec76a6d7
add ModelLogEntry model
2021-10-01 16:30:05 +01:00
Matt Westcott
74187b4fb4
Rename page_log_action_registry to wagtail.core.log_actions.registry
...
This reflects the fact that we only expect one registry to exist. Also, drop the need for log models to keep track of which registry they're attached to (because there's only one)
2021-10-01 16:30:05 +01:00
Matt Westcott
69c77be969
Revert "Allow different registries to be created for different object types"
...
This reverts commit f2f6167f5d
.
Rather than having a separate registry per object type, it makes sense to have a single registry to keep track of how all object types handle logging. Otherwise, we'll end up needing a registry of registries to see which registry we should consult for a given model...
2021-10-01 16:30:05 +01:00
Matt Westcott
f8e7a049c0
Release note for #7540
2021-10-01 16:28:20 +01:00
Vince Salvino
202380f712
Fix sass->css output, use system paths.
2021-10-01 16:25:29 +01:00
Matt Westcott
5465d2e11b
Fetch new translations from Transifex
2021-10-01 13:41:47 +01:00
Matt Westcott
8886cf7ada
fix double-pasted comment
2021-10-01 13:21:05 +01:00
Coen van der Kamp
f1175658bc
Add release note about default Dutch (nl)
2021-10-01 13:19:39 +01:00
Coen van der Kamp
4c6da378e8
Drop nl_NL, Dutch translations are moved to nl on Transifex
2021-10-01 13:15:25 +01:00
LB Johnston
a8636781b0
release notes for #7554 & #7545
...
- #7554 & #7545
2021-10-01 07:23:53 +10:00
Jochen Wersdörfer
e7fe66a93e
replaced removed .is_ajax method with request.headers.get('x-requested-with') == 'XMLHttpRequest'.
...
- https://docs.djangoproject.com/en/3.2/releases/3.1/#id2
> The HttpRequest.is_ajax() method is deprecated as it relied on a jQuery-specific way of signifying AJAX calls, while current usage tends to use the JavaScript Fetch API. Depending on your use case, you can either write your own AJAX detection method, or use the new HttpRequest.accepts() method if your code depends on the client Accept HTTP header.
2021-10-01 07:13:42 +10:00
Jochen Wersdörfer
7a0f3b3684
replaced removed urlquote function with quote from standard library
...
- https://docs.djangoproject.com/en/dev/releases/3.0/#id3
> django.utils.http.urlquote(), urlquote_plus(), urlunquote(), and urlunquote_plus() are deprecated in favor of the functions that they’re aliases for: urllib.parse.quote(), quote_plus(), unquote(), and unquote_plus().
2021-10-01 07:13:42 +10:00
Daniel
381b11f54f
Include custom permissions hook documentation
2021-10-01 06:52:43 +10:00
Matt Westcott
1b9dfc81ba
Add section about CSV exports to security docs
...
Security researchers frequently report CSV formula injection as a security vulnerability in Wagtail, but that's the responsibility of the software consuming the CSV, not creating it. Hopefully this explanation will stop them from doing that (or at least give us a ready-made response to point at when they do).
2021-10-01 06:38:32 +10:00
Joe Howard
4ab7080fb8
Documentation - Remove ambiguity about ModelAdmin templates
...
- The modeladmin folder needs to be inside the templates folder of the relevant app.
- The way it was written makes it seem like /modeladmin/ should be placed in the project root directory.
2021-09-30 21:32:57 +10:00
JaneLiu
92381698d0
Add code example for before_delete_page
hook
2021-09-30 21:15:33 +10:00
LB Johnston
42da0b1083
fix flake8 linting issue
2021-09-30 19:35:08 +10:00
Fabien Le Frapper
cbd7b028d5
images - move shared file handling methods to mixins
...
- add ImageFileMixin to house contextmanager (file opening & willow image handling) + is_stored_locally method
- use mixin in AbstractImage & AbstractRendition
2021-09-30 19:11:37 +10:00
Matt Westcott
81f8f99215
Link to Github discussion boards
2021-09-30 19:00:18 +10:00
Kamil Marut
8d42bec5e6
Add "other permissions" to group permissions
...
- instead of a separate table containing all discrete permissions for each object, show these in the object's table
- Wagtail admin access will still show inside 'other permissions'
- resolves #5482
2021-09-30 18:54:46 +10:00
LB Johnston
1bfe22efcb
changelog - fix duplicate name (typo)
2021-09-30 08:26:24 +10:00
Desaiakshata
997ac738b0
dropdown - improve focus and high contrast mode visibility
...
- Update _dropdown.legacy.scss
- improvement to existing styles for dropdown/up button on focus and windows high contrast mode
- see #7366
2021-09-30 08:12:00 +10:00
LB Johnston
d6acc841b8
Include latest changes for hiding disabled workflow tasks
...
workflow - do not show disabled (not active) tasks in the task chooser modal
- fixes #7401
2021-09-29 12:35:33 -04:00
LB Johnston
d6bb9bb5c0
workflow - do not show disabled (not active) tasks in the task chooser modal
...
- fixes #7401
2021-09-29 11:48:35 -04:00
Karl Hobley
607d356076
Changelog / release note for #7548
2021-09-29 12:02:59 +01:00
Mitchel Cabuloy
d026632894
Add page synchronization to simple_translation
2021-09-29 11:43:45 +01:00
Stefan Hammer
f533726de3
Add missing bind_to call to PreviewOnEdit
...
Added test for page preview with custom edit handlers
fixes #7537
2021-09-28 08:17:59 +10:00
Matt Westcott
3b972775fc
Deprecate passing callables as log messages
2021-09-27 19:54:25 +01:00
Matt Westcott
9bd83fd0a3
Consistently use 'message' and 'comment' properties on BaseLogEntry
...
This avoids bouncing control between BaseLogEntry and LogRegistry, and saves report-side code from having to explicitly import the registry
2021-09-27 19:54:24 +01:00
Matt Westcott
d84a967f17
Add LogFormatter classes to handle formatting log messages
...
This makes registering actions cleaner, and avoids having a bundle of different lookup tables within the log registry
2021-09-27 19:54:24 +01:00
Matt Westcott
de549b4288
Register admin URL finder for site settings
2021-09-27 19:32:54 +01:00
Matt Westcott
5b48fed3d6
Register admin URL finder for users
2021-09-27 19:32:54 +01:00