From 7f0bf9c9a33ccf2cbf81e7ff54a91e35cd588cd0 Mon Sep 17 00:00:00 2001 From: Walter Jenner Date: Mon, 9 May 2016 15:49:21 +0200 Subject: [PATCH] add permission to increase entity view count --- entity_view_count.module | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/entity_view_count.module b/entity_view_count.module index f0a9e4c..e64acbb 100644 --- a/entity_view_count.module +++ b/entity_view_count.module @@ -37,6 +37,10 @@ function entity_view_count_permission() { 'title' => t('View entity view count field'), 'description' => t('Allow to the user watch the entity view count values.'), ), + 'increase entity view count' => array( + 'title' => t('Increase entity view count'), + 'description' => t('Allow to the user to increase the entity view count values.'), + ), ); } @@ -156,6 +160,10 @@ function entity_view_count_entity_view($entity, $type, $view_mode, $langcode) { return; } + if (!user_access('increase entity view count')) { + return; + } + $params = array( 'entity_type' => $type, 'entity' => $entity,