boonebgorges / buddypress-docs

GNU General Public License v3.0
106 stars 44 forks source link

Comment "read" and "post" settings conflict. #558

Open dcavins opened 7 years ago

dcavins commented 7 years ago

If I set a restrictive "read comments" setting like "doc author only" and a more permissive "post comments" setting like "logged-in", the comments section isn't visible to logged-in users.

The problem is that the permission logic nesting hides everything based on the "read" setting. (See https://gist.github.com/dcavins/5e6ef39d1ffac33ee450e55afde68a3f)

One way this could be better is if have_comments accepted a user_id param, then we could show the current user's comments on the doc if the "read" access were restricted, and show all the comments if the "read" value were permissive.

boonebgorges commented 7 years ago

Sure, this can definitely be broken out.