Incorrect capabilities in plugin
-
There is quite incorrect capabilities coded in the plugin.
theportfolioandvp_listspost types have the same capabilities, that makes bunch of problems with our sites.for example, we want to grant specific capability to specific role (i.e. using codes or plugins like Role Editor) and we assing “edit portfolio” capability to “contributor” role.
then s/he automatically gets capability (because it’s same) to edit vp_lists (layouts) too.
so, they should have different capabilities. at this moment, it’s coded like this in your plugin “classes/class-admin.php”:
'capabilities' => array( 'edit_post' => 'edit_portfolio', 'edit_posts' => 'edit_portfolios', 'edit_others_posts' => 'edit_other_portfolios', 'publish_posts' => 'publish_portfolios', 'read_post' => 'read_portfolio', 'read_private_posts' => 'read_private_portfolios', 'delete_posts' => 'delete_portfolios', 'delete_post' => 'delete_portfolio', ),in both places this code is used for
portfolioand forvp_lists.
please ammend, as they should have different capability names, like:` ‘capabilities’ => array(
‘edit_post’ => ‘edit_portfolio_layout’ //instead of ‘edit_portfolio’
….
The topic ‘Incorrect capabilities in plugin’ is closed to new replies.