<?php
function THEMENAME_preprocess_node(&$variables) {
$allowed_types = array(
"_NODE_TYPE", // Array of types
);
global $user;
if ($user->uid != $variables['uid'] && in_array($variables['type'], $allowed_types)) {
$variables['content']['body'][0]['#markup'] = "<p>Вы не автор данного материала и не имеете прав на его просмотр.</p>";
}
}