[wp-trac] [WordPress Trac] #38816: REST API: logic error in comments post ID
WordPress Trac
noreply at wordpress.org
Thu Nov 17 23:04:09 UTC 2016
#38816: REST API: logic error in comments post ID
----------------------------------------+-----------------------
Reporter: dd32 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.7
Component: Comments | Version:
Severity: normal | Resolution:
Keywords: has-patch needs-unit-tests | Focuses: rest-api
----------------------------------------+-----------------------
Comment (by dd32):
> We support this with the REST API because wp_insert_comment() supports
adding comments without an attached post_ID - and our endpoints are
intended to mirror the underlying WordPress API functions.
Yeah, I strongly disagree with that on this count at least. Even though
the underlying API allows it, doesn't mean it should be possible. Some
things just shouldn't be done through a generic endpoint, if a plugin
wanted the ability to create those for some reason, why should it not have
to add it's own endpoint for that specific use-case?
I also dislike the `moderate_comments` cap being re-used for things that
it doesn't represent - It represents the ability to moderate comments.. it
doesn't mean that the user is a higher privileged user who can create
special content (AFAIK)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38816#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list