Quantcast
Channel: WordPress.org Forums » [WP-Filebase Download Manager] Support
Viewing all articles
Browse latest Browse all 1341

muhammadn on "[Plugin: WP-Filebase Download Manager] role based restriction"

$
0
0

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/


Viewing all articles
Browse latest Browse all 1341

Trending Articles