Changes between Initial Version and Version 1 of Ticket #47443, comment 10
- Timestamp:
- 01/24/2020 09:37:37 PM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #47443, comment 10
initial v1 1 Uploaded a patch with a slight modification to the switch statement in ''wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php''. I found that it was necessary to distinguish between the "publish" and "future" cases in order for all previous unit tests to pass. Otherwise, test_create_post_publish_without_permission() (line 2303 in ''tests/phpunit/tests/rest-api/rest-posts-controller.php'') fails , due to the "publish_posts" capability being removed from the "author" role, which would still retain the "edit_publish_posts" capability. Also added a new unit test.1 Uploaded a patch with a slight modification to the switch statement in ''wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php''. I found that it was necessary to distinguish between the "publish" and "future" cases in order for all previous unit tests to pass. Otherwise, test_create_post_publish_without_permission() (line 2303 in ''tests/phpunit/tests/rest-api/rest-posts-controller.php'') fails. In this scenario, the role would still be allowed to publish posts, even though it loses the "publish_posts" capability, because it still retains the "edit_published_posts" capability. Also added a new unit test.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)