[ad_1]
Hi, I’ve found some compatibility issues – there are cases where the security plugin wipes out admin menus and breaks capability checks.
In some cases the map_meta_cap filter’s 2nd parameter $cap evaluates to true, so because the following code in the Editors Service does not do a strict comparison the condition will pass:
public function disable_file_edit( $caps, $cap ) {
if ( in_array( $cap, array( 'edit_themes', 'edit_plugins', 'edit_files' ) ) ) {
return array( 'sg-security' );
}
return $caps;
}
The in_array() function should use the 3rd argument as true so it does a strict comparison rather than a loose one.
Cheers!
