WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: WP Sentry] post titles visible to non-group members (7 posts)

  1. fionadix
    Member
    Posted 5 years ago #

    Hi, WP Sentry is an excellent plugin, very useful for a community site. Everything worked perfectly and was easy to use, except that we found that a logged in member of one group we made was able to see the titles of posts limited to other groups to which they didn't belong, even when Preview was set to none.

    We narrowed it down to the fact that the filter to allow viewing of single posts is setting the user to have general read_private* privileges before the filter for posts_where fires and the posts are listed. So the database query to list the posts is always including "OR wp_memb_posts.post_status = 'private'" and the user can see the post titles whether they should be able to or not.

    We fixed it by adding a condition to the has_capability function to return the capabilities unchanged everywhere apart from on a single post or page

    if ( is_single() || is_page() )

    Seems to work fine and not have broken anything else!

    Really looking forward to seeing how this develops.

    Alan and Fiona

    http://wordpress.org/extend/plugins/wp-sentry/

  2. PeteHoliday
    Member
    Posted 5 years ago #

    Thanks for this bug fix, I will take a look this afternoon and push through an update!

  3. PeteHoliday
    Member
    Posted 5 years ago #

    Fix has been implemented and uploaded to WP Extend. Thanks!

  4. fionadix
    Member
    Posted 5 years ago #

    that was quick! - thanks very much, just installed it :-)

  5. mukeshwani
    Member
    Posted 5 years ago #

    Hi, I loaded up the plugin, and tried to add groups. The screen just refreshes but no groups are added. We are using WP 2.7.

    Thanks,
    Mukesh

  6. PeteHoliday
    Member
    Posted 5 years ago #

    What version of the plugin?

  7. PeteHoliday
    Member
    Posted 5 years ago #

    This problem may have been fixed in today's release of version 0.6.6. Please send me an email if the new version doesn't resolve your problems.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags