You have permission

The CETIS blogs had a requirement (from day zero) that all the contributors should be able to see each-others “private” posts. The idea behind this is that blogs can be used for internal reporting and chat within the organisation at the same time as being used for public work.

I had scratched my head and tried a whole range of plugins for wordpress-mu to try and achieve this however nothing quite did what I needed. The closest was the Role Manager plugin however it didn’t work with wordpress-mu… and after I had spent a quantity of time trying to get it working I realised that roles were assigned to users on a per-blog basis rather than globally. It’s a shame as a roles and capabilities based solution had sounded reasonably elegant.

Today I work up with the resolve that I should just take matters into my own hands and make a small plugin of my own design to force wordpress-mu into doing what I wanted. Well actually I started with a direct hack on the source and then thought better of it and wrote a plugin instead! It manipulates the main wordpress query (as found in “query.php”) force-bypassing the user capability check.

I also gave the plugin the option of showing private posts in un-authenticated outgoing news feeds – for the sake of sanity this is limited to post titles and urls. To do this you have to append ?showprivate=true to the feed url.

It even has a rough administrative interface allowing the private feeds and posts to be turned on and off.

Download the source code

3 thoughts on “You have permission

  1. Hi there!

    I found your link on the Role Manager Plugin’s homepage. Seems you’ve solved my problem with RM and WPMU. Only the download link at the end of this post is broken. Would you still share the code? If yes, emailing would be excellent!

    Thanks in advance,
    Caspar

  2. Hi,
    I too have been looking for this all over the place with no luck.
    Mind sharing the code- Email will be ok too.
    Thanks very much!!