REST API: Add support for comments of password-protected posts
|Reported by:||jnylen0||Owned by:||joehoyle|
|Component:||REST API||Keywords:||has-patch has-unit-tests|
Migrated from https://github.com/WP-API/WP-API/issues/2791. Current status from @rachelbaker:
The Comments Controller does not have a password param to support viewing/editing/creating/deleting comments on password protected posts. Attempting to interact with a comment on a password protected post returns a WP_Error because without the proper post password the permission checks fail.
- Add the password param to allow users to pass the password for the related Post to a Comment.
- Modify our permission checks to support handling the password param
- Add unit tests
I think this parameter should be called post_password and we should try to get this into 4.7 for consistency and completeness. Arguable whether this is a bug, but it's unexpected behavior to me.