As I’ve understood it: If I give a user the respond_to_site-review capability they can answer reviews on pages/posts where they are the author.
Reviews can only be responded to from the Admin side, either by editing a review, or directly on the “All Reviews” page (similar to “Quick Edit” on posts).
I don’t want to give author access to the companies to their own pages on my site because I don’t want them to change the content. However, I do want them to be able to respond to reviews given to their company page.
To do this, simply remove all page permissions (except for “read”) from the user role. You may need to to experiment a bit to get the capabilities right for your user roles.
Is there a workaround?
Here is a solution you may find interesting. Add the assigned_users
option to the shortcodes (you can use this option together with the assigned_posts option), and then use the following snippet to restrict reviews that are visible in the admin area to only those which have been assigned to the current logged in user.
https://pastebin.com/5jHK5LQR
So for example, on the “Acme Inc.” company page, you would do something like this (where 13 is the User ID of the person who you want to assign the company reviews to):
[site_reviews_summary assigned_posts="post_id" assigned_users="13"]
[site_reviews assigned_posts="post_id" assigned_users="13" pagination="ajax"]
[site_reviews_form assigned_posts="post_id" assigned_users="13"]
And then make sure to give the user role the respond_to_site-reviews
capability.
For administrators it will look like this:
And for users with the user role it would look like this: