kopia lustrzana https://github.com/wagtail/wagtail
Add upgrade considerations for get_pages_with_direct_explore_permission and get_explorable_root_page
rodzic
cddb2d657a
commit
88ba49b496
|
@ -109,3 +109,7 @@ permission_policy.user_has_any_permission(user, "unlock")
|
|||
The `UserPagePermissionsProxy` object that was previously available in page's `ActionMenuItem` context as `user_page_permissions` has been removed. In cases where the page object is available (e.g. the page edit view), the `PagePermissionTester` object stored as the `user_page_permissions_tester` context variable is still available.
|
||||
|
||||
If you use `UserPagePermissionsProxy` in your code, e.g. the `user_page_permissions` context variable in an `ActionMenuItem` subclass as part of your `register_page_action_menu_item` hooks, make sure to replace it either with the `PagePermissionTester` or the `PagePermissionPolicy` equivalent.
|
||||
|
||||
### `get_pages_with_direct_explore_permission` and `get_explorable_root_page` are deprecated
|
||||
|
||||
The undocumented `get_pages_with_direct_explore_permission` and `get_explorable_root_page` functions in `wagtail.admin.navigation` are deprecated. They can be replaced with `PagePermissionPolicy().instances_with_direct_explore_permission(user)` and `PagePermissionPolicy().explorable_root_instance(user)`, respectively.
|
||||
|
|
Ładowanie…
Reference in New Issue