Title: role based restriction
Last modified: August 30, 2016

---

# role based restriction

 *  [muhammadn](https://wordpress.org/support/users/muhammadn/)
 * (@muhammadn)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/role-based-restriction/)
 * Hi,
 * here I’m using User Role Editor to assign different roles and capabilities to
   different users, I need to do that to let each user download related files, say
   user1 has roles of role_a, role_b and user2 has just role_b
    so user1 should 
   be able to see and download files restricted to role_a and role_b and of course
   user2 may download the role_b restricted files … of course having 10 types of
   roles in my project it creates 2^10 roles if I want to make unique roles for 
   each scenario!
 * but as far as I understand, wp_filebase just checks the highest role to see if
   user is allowed to access file, which I think is not right and in my opinion 
   it should check something like this :
 * in_array(‘ROLE_REQUIRED_BY_FILE’, $user->roles)
 * or am I dowing something wrong?!
 * [https://wordpress.org/plugins/wp-filebase/](https://wordpress.org/plugins/wp-filebase/)

The topic ‘role based restriction’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-filebase_ffff6e.svg)
 * [WP-Filebase Download Manager](https://wordpress.org/plugins/wp-filebase/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-filebase/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-filebase/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-filebase/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-filebase/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-filebase/reviews/)

## Tags

 * [role](https://wordpress.org/support/topic-tag/role/)

 * 0 replies
 * 1 participant
 * Last reply from: [muhammadn](https://wordpress.org/support/users/muhammadn/)
 * Last activity: [10 years, 11 months ago](https://wordpress.org/support/topic/role-based-restriction/)
 * Status: not resolved