Unable to preview comments when restricted from posting.
Opened this issue · 1 comments
When a user can comment on a o2 site, but cannot post to it, the user is unable to preview their o2 comments.
This is caused by the below code which requires that the user have edit post rights in order to use the preview endpoint.
https://github.com/Automattic/o2/blob/master/inc/read-api.php#L464-L468
This code branch should allow a comment preview (but NOT a post preview) when the user can create a comment, but alike, it should not allow a comment preview when the user cannot comment (ie. unauthenticated, or blocked from commenting too).
The experience a user will see when running into this situation, is a The connection to the server has been interrupted. Please reconnect.
error.
As reported on the WordPress.org slack instance: https://wordpress.slack.com/archives/C02QB8GMM/p1636931587138600