Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions entity_view_count.module
Original file line number Diff line number Diff line change
Expand Up @@ -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.'),
),
);
}

Expand Down Expand Up @@ -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,
Expand Down