Sage Abdullah
e6e392dc96
Release notes for #10562
2023-06-19 15:29:30 +01:00
Sage Abdullah
09ea58b53b
Update upgrade considerations regarding user_page_permissions
2023-06-19 15:25:03 +01:00
Sage Abdullah
be81209b43
Reinstate user_page_permissions context variable as part of the page_permissions tag
2023-06-19 15:25:02 +01:00
Sage Abdullah
f8d5151140
Move UserPagePermissionsProxy deprecation warning to each method
2023-06-19 15:25:02 +01:00
Sage Abdullah
6531c4ff98
Reinstate UserPagePermissionsProxy object in ActionMenuItem's context
2023-06-19 15:25:02 +01:00
Sage Abdullah
aa88061824
Simplify user_has_any_page_permission to only use PagePermissionPolicy.user_has_any_permission()
2023-06-19 15:25:02 +01:00
Sage Abdullah
1d0609826d
Simplify publish and edit permissions check in NotificationPreferencesForm
2023-06-19 15:25:02 +01:00
Sage Abdullah
c6f1667e5f
Fix incorrect user_has_any_permission usage
2023-06-19 15:25:02 +01:00
Sage Abdullah
1b4d7902b1
Deprecate wagtail.admin.auth.users_with_page_permission
2023-06-19 15:25:02 +01:00
Sage Abdullah
88ba49b496
Add upgrade considerations for get_pages_with_direct_explore_permission and get_explorable_root_page
2023-06-19 15:25:01 +01:00
Sage Abdullah
cddb2d657a
Deprecate get_explorable_root_page
2023-06-19 15:25:01 +01:00
Sage Abdullah
d4f9f3f9d1
Deprecate get_pages_with_direct_explore_permission
2023-06-19 15:25:01 +01:00
Sage Abdullah
18379f0131
Replace get_explorable_root_page() usage with PagePermissionPolicy.explorable_root_instance()
2023-06-19 15:25:01 +01:00
Sage Abdullah
1b3d6edbf6
Deprecate UserPagePermissionsProxy
2023-06-19 15:25:01 +01:00
Sage Abdullah
91be849e01
Move UserPagePermissionsProxy.revisions_for_moderation() to PagePermissionPolicy
...
This should be deprecated soon as part of the legacy moderation system removal,
but for now we'll move it to the PagePermissionPolicy so we can eliminate
the use of UserPagePermissionsProxy
2023-06-19 15:25:01 +01:00
Sage Abdullah
110f1cf674
Replace remaining UserPagePermissionsProxy usage with PagePermissionPolicy where possible
2023-06-19 15:25:00 +01:00
Sage Abdullah
fa2a64e9d2
Remove user_page_permissions from page's ActionMenuItem
2023-06-19 15:25:00 +01:00
Sage Abdullah
25d9a93798
Remove UserPagePermissionsProxy usage in account settings
2023-06-19 15:25:00 +01:00
Sage Abdullah
0ed63a30b2
Make can_choose_page accept a user instead of UserPagePermissionsProxy object
2023-06-19 15:25:00 +01:00
Sage Abdullah
d15e7b4313
Replace UserPagePermissionsProxy.for_page() with Page.permissions_for_user()
2023-06-19 15:25:00 +01:00
Sage Abdullah
56b678c19e
Detach PagePermissionTester from UserPagePermissionsProxy
2023-06-19 15:25:00 +01:00
Sage Abdullah
54a0ca0044
Add test to assert number of queries for the page edit view as an editor
2023-06-19 15:24:59 +01:00
Sage Abdullah
92510e7f13
Cache explorable root page on user object via PagePermissionPolicy
2023-06-19 15:24:59 +01:00
Sage Abdullah
bacba73b93
Move UserPagePermissionsProxy.explorable_pages logic to PagePermissionPolicy
2023-06-19 15:24:59 +01:00
Sage Abdullah
87af89db05
Move get_explorable_root_page logic to PagePermissionPolicy
2023-06-19 15:24:59 +01:00
Sage Abdullah
4231e33c27
Add first_common_ancestor_of manager method that works with a list of pages instead of a queryset
...
and use it in UserPagePermissionsProxy.explorable_pages
2023-06-19 15:24:59 +01:00
Sage Abdullah
ae07600736
Refactor users_with_page_permission to use PagePermissionPolicy
2023-06-19 15:24:59 +01:00
Sage Abdullah
38368f0f9d
Refactor user_has_any_page_permission to use PagePermissionPolicy
2023-06-19 15:24:58 +01:00
Sage Abdullah
b03296bbe4
Refactor UserPagePermissionsProxy to use PagePermissionPolicy
2023-06-19 15:24:58 +01:00
LB Johnston
96a494581c
Documentation - clean up last two internal refs to use underscore
...
- As per https://docs.wagtail.org/en/latest/contributing/documentation_guidelines.html#reference-links - refs should be `lower_snake_case`
2023-06-19 15:18:02 +01:00
Sage Abdullah
4422e65d25
Release notes for #10470
2023-06-16 11:44:44 +01:00
Sage Abdullah
e2c5a3cf52
Rename BasePermissionPolicy.perm_cache_name to permission_cache_name
...
Also rename _page_perm_cache to _page_permission_cache
2023-06-16 10:22:07 +01:00
Sage Abdullah
7265fee7b4
Fix PagePermissionPolicy's user_has_any_permission and users_with_any_permission to consider implied edit permission from add permission
2023-06-16 10:20:55 +01:00
Sage Abdullah
2462f8c77d
Improve test coverage of PagePermissionPolicy
2023-06-16 09:41:10 +01:00
Sage Abdullah
8cc98c1d12
Simplify PagePermissionPolicy.users_with_any_permission_for_instance query
2023-06-16 09:41:10 +01:00
Sage Abdullah
4e3c7d17f3
Compute edit permission for page owners with add permission in PagePermissionPolicy
2023-06-16 09:41:10 +01:00
Sage Abdullah
56d6e25fae
Make use of descendant_of in PagePermissionTester
2023-06-16 09:41:10 +01:00
Sage Abdullah
28db7624b2
Return permission queryset instead of set in PagePermissionPolicy
2023-06-16 09:41:10 +01:00
Sage Abdullah
041ca6c03b
Add default model argument for PagePermissionProxy
2023-06-16 09:41:09 +01:00
Sage Abdullah
93fc013222
Use precached GroupPagePermission instances to do PagePermissionPolicy queries
2023-06-16 09:41:09 +01:00
Sage Abdullah
193b53af19
Add get_all_permissions_for_user and get_cached_permissions_for_user to BasePermissionPolicy
2023-06-16 09:41:09 +01:00
Sage Abdullah
729363a5fc
Replace exists query with values list for users_with_permission query
...
This prevents crash on Django < 4.0
2023-06-16 09:41:09 +01:00
Sage Abdullah
f541dd9231
Add tests for PagePermissionPolicy
2023-06-16 09:41:09 +01:00
Sage Abdullah
ecfe607e44
Create PagePermissionPolicy with basic GroupPagePermission queries
...
This does not yet take into account more complex logic around advanced
nuances such as ownership and publish permissions.
2023-06-16 09:41:08 +01:00
Thibaud Colas
4848722731
Add new expanded indicator with bottom border for side panel buttons. Fix #9174
2023-06-15 15:53:53 +01:00
Thibaud Colas
abe30d289f
Use the correct width for slim header buttons
2023-06-15 15:53:53 +01:00
Thibaud Colas
284a4ef78e
Move all slim header button classes to be defined in slim_header.html
2023-06-15 15:53:53 +01:00
Thibaud Colas
9285e77734
Allow 2px borders in utility classes
2023-06-15 15:53:53 +01:00
Matt Westcott
840498fc1b
Release note for #10563 in 5.0.2
2023-06-15 12:22:55 +01:00
Matt Westcott
a735265d11
Release note for #10563 in 5.1
2023-06-15 12:22:55 +01:00