Try this code in pages.php, it allows only for Administrators...
public function onBeforeWrite() {
if(!Permission::check('ADMIN')){
if (!$this->ParentID) {
user_error('Cannot create new page at top level', E_USER_ERROR);
exit();
}
}
parent::onBeforeWrite();
}