You could hook to the get_terms_args
filter conditionally depending on your user/role
Something along those lines
add_filter( 'get_terms_args', 'restrict_cat', 10, 2 );
function restrict_cat( $args, $taxonomies ){
// Don't run if we are not dealing with categories
if( 'category' != $taxonomies[0] )
return $args;
// The check for the user we want to restrict
// you could use current_user_can( $capability ) or test for a specific role here
if( 1 == get_current_user_id() ){
$args['exclude'] = array(
'cat_id1',
'cat_id2'
);
return $args;
}
return $args;
}
check out https://developer.wordpress.org/reference/functions/get_terms/ for a list of available args.