This works for me:
add_filter( ‘fep_current_user_can’, function( $can, $cap, $id ){
if ( ‘add_announcement’ !== $cap ) {
return $can;
}
if ( array_intersect( wp_get_current_user()->roles, [ ‘administrator_02’, ‘urednik’, ‘administrator’ ] ) ) {
return true;
}
return false;
}, 10, 3);
Have a nice day!