I have been working on doing some alterations to Mango Blog. One of my main requirements was to make certain sections only viewable to certain users. I did some digging and only fond one plug-in that would come close to accomplishing this, Authors Only. However, it had a couple draw backs. It only required the user to be logged in. Also, it protected the entire site not just certain areas.
So, using the Authors Only plug-in as a base I created a new plug-in I called, roleSecure. What this does is secure pages/posts by user role. It is very straight forward to use and requires no alteration to your current setup. All you have to do is this...
- Add a custom field to a page/post where the label and key are named "secure".
- Add a value to this field that is the name of a role.
If a user hits one of these pages they will be presented with a log in instead of the content. They also receive a friendly message if they are logged in but their role does not match the roles on the page/post.
There are some limitations and I am still working on making it more robust. Let me know if you find any issues or problems with it.
Click the download link below to get the plug-in.
Till next time...
--Dave
#1 by Mark Aplet on 7/12/10 - 7:16 PM
#2 by Dave Ferguson on 7/13/10 - 4:12 PM
--Dave