Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I installed several plugins(buddypress-docs,achievement,bbpress), each one create capabilities for their own post_type. I would prefer to make all roles and capabilities unified into one system, Is there a solution to overwrite all existing caps and control all post_types? Eventually I would like to organize users by group, and assign each user group different caps across all types.

share|improve this question
2  
Some examples would be very helpful. Be specific! :) –  toscho Oct 27 '12 at 2:12
    
just added the plugin names –  Jenny Oct 27 '12 at 7:08
add comment

2 Answers 2

Try the Members Plugin. This will allow you to create a new roles (which you can then assign to the groups) with their own cap or mixture thereof.

share|improve this answer
    
for example, in the CPT templates, it normally has conditional tags such as if(bp_docs_user_can($cap)), then, display the content. So, after I use Members or Role-scope, how the CPT templates cope up ? –  Jenny Oct 27 '12 at 8:39
2  
justintadlock.com/archives/2010/07/10/… and justintadlock.com/archives/2012/10/16/… should point you in the right direction. –  BandonRandon Oct 27 '12 at 9:08
    
just finished reading the 2 articles,great resource! I tried Members before, it seems to me it doesn't handle the situation where I want to allow certain users to have the cap to edit posts under a category. –  Jenny Oct 27 '12 at 9:54
add comment

Members plugin will do exactly what you're looking for. I use it in conjuntion with manually adding caps:

// Manipulating a role's capabilities -> http://codex.wordpress.org/Roles_and_Capabilities#edit_posts
function manipulate_role(){
   $role = get_role( 'Master Editor' ); // pick up role to edit

   $role->add_cap( 'edit_users' );
   $role->remove_cap( 'update_core' );         
}
add_action( 'admin_init', 'manipulate_role');

Maybe it's just me but I found that mapping your own cpt's is the worst idea ever...

Download Map Cap for that instead of coding your "maps". WP has a ways to go with roles and caps and you'll never be able to write code that works as good or better than what Map Cap can accomplish with a few checkboxes.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.