I created an interface that allows users to do a certain number of actions, each of them having a capability associated (including accessing the interface). I would like to have a base capability (primitive here?) that is required to have if a user wants to preform all of the other actions: if the user can delete an item, the user must also be able to access the interface.
Several plugins allow to add/remove capabilities: I would like to prevent the case when a user can delete but cannot access the interface from happening.
I understand that with post types and meta capabilities and map_meta_cap filter - I am having a hard time to apply that to my plugin, though.
I could check both all the time, but the permission hierarchy will eventually be more complex (say, 3 levels - user must have the capabilities access_interface, create_item and create_typeX_item to be able to create an item of type X) so it sounds silly to duplicate code all over the place instead of just checking one capability (in my example: create_typeX_item). I am NOT dealing with a custom post type, and it isn't an option, so I don't know if the use map_meta_cap filter is relevant in this case, and if so I don't know how to use it.