wp-media/search-and-replace

permissions issue when using roots.io tools

voiteck opened this issue · 1 comments

Hi,
in file inc/Page/Manager.php
on line 66 you have user capability check:
$cap = apply_filters( 'insr-capability', 'install_plugins', $page );

Do you think it's possible to change it to something less restrictive? Maybe "activate_plugins"?
It's problem when using root.io tools (which makes WP software-as-a-service). With this approach you are unable to install or update any plugin or theme with administration panel, instead of this you need to make new deploy.

Hi @voiteck,

on line 66 you see a Hook apply_filters( 'insr-capability', 'install_plugins', $page ); so if you want to change the restriction like activate_plugins you can use the following snip.

add_filter( 'insr-capability', function(){
    return 'activate_plugins';
});