Title: Role base Selection options
Last modified: August 21, 2016

---

# Role base Selection options

 *  Resolved [Rishikant](https://wordpress.org/support/users/rishikant/)
 * (@rishikant)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/role-base-selection-options/)
 * Respected Sir,
    Thanks for this wonderful plugin. We are working on an educational
   site using WP+BP.What we are trying to use this buddydrive, as specific role 
   would be able to use it. We need options who can use it, whether Admin, Group
   Moderator or members. Hoping for reply soon. Thanks and regards
 * [http://wordpress.org/plugins/buddydrive/](http://wordpress.org/plugins/buddydrive/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Mathieu Viet](https://wordpress.org/support/users/imath/)
 * (@imath)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/role-base-selection-options/#post-4080998)
 * Hi, thanks for “wonderful” 🙂
 * You can do it without an option actually. To do so, simply create a empty template
   named ‘buddydrive-noaccess.php’ in your theme’s folder. In it you can add the
   markup of your choice to tell the user he must have an higher level to benefit
   from BuddyDrive.
 * Now in the functions.php of your theme, simply add these lines to load the no
   access template if the user hasn’t got the needed capacity. ( i’ve tried with
   a bbPress role > moderator, and it’s working )
 *     ```
       function rishikant_restrict_by_capacity( $template = '' ) {
       	if( !current_user_can( 'moderate' ) )
       		$template = 'buddydrive-noaccess';
   
       	return $template;
       }
   
       add_filter( 'buddydrive_user_files', 'rishikant_restrict_by_capacity', 10, 1 );
       ```
   
 *  Thread Starter [Rishikant](https://wordpress.org/support/users/rishikant/)
 * (@rishikant)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/role-base-selection-options/#post-4081008)
 * Thanks for help, we are working on this.
 *  [Rocio Valdivia](https://wordpress.org/support/users/_dorsvenabili/)
 * (@_dorsvenabili)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/role-base-selection-options/#post-4081139)
 * Hi imath,
 * thank you for your plugin, it works great! 🙂
 * I’ve just tried your above function and subscribers still have access to the 
   BuddyDrive documents (I created the buddydrive-noaccess.php template too).
 * This posts has 11 months, I was wondering if maybe this solution is not working
   anymore?
 * Thank you in advance 🙂

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Role base Selection options’ is closed to new replies.

 * ![](https://ps.w.org/buddydrive/assets/icon-256x256.png?rev=3305954)
 * [BuddyDrive](https://wordpress.org/plugins/buddydrive/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/buddydrive/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/buddydrive/)
 * [Active Topics](https://wordpress.org/support/plugin/buddydrive/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/buddydrive/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/buddydrive/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [Rocio Valdivia](https://wordpress.org/support/users/_dorsvenabili/)
 * Last activity: [11 years, 9 months ago](https://wordpress.org/support/topic/role-base-selection-options/#post-4081139)
 * Status: resolved