Skip to content

Unable to preview comments when restricted from posting. #215

@dd32

Description

@dd32

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions