rewrite using hook_entity_view_alter(); added permission for errors
completed botched merge