Custom Capability Not Working when Multiple Roles Assigned
-
Hi,
I am a plugin vendor and my user wants to allow users with a custom role to be able to access my plugin functionality.
I created a custom capability from my plugin code
manage_ip_ranges
. Now the test user has 3 Roles Editor, Super Editor (Custom Role), Subscriber.Using your plugin if I allow the custom cap
manage_ip_ranges
to Super Editor (Custom Role) it works only if the user has 1 Role assigned “Super Editor (Custom Role)”. If the user has multiple roles it takes the cap based on the last role assigned.So even if I allowed the cap for Super Editor (Custom Role) and the same is not allowed to “Subscriber” due to this it takes the cap from the last role assigned and does not allow access to the intended functionality.
- The topic ‘Custom Capability Not Working when Multiple Roles Assigned’ is closed to new replies.