[drupal-devel] [bug] QUICKFIX: utilize stat access right when printing view count

Dries drupal-devel at drupal.org
Sat Jan 22 09:32:48 UTC 2005

 Project:      Drupal
 Version:      cvs
 Component:    statistics.module
 Category:     bug reports
 Priority:     normal
 Assigned to:  Goba
 Reported by:  Goba
 Updated by:   Dries
 Status:       patch

Shouldn't that be user_access('access statistics') instead of
array('access statistics')?  (Easy enough to fix.)

Note that 'access statistics' allows access to the administration pages
so I'm not sure this patch is a good idea.    

Food for thought/dicussion.


Previous comments:

January 21, 2005 - 18:40 : Goba

Attachment: http://drupal.org/files/issues/Drupal-utilize-stat-access-right.patch (724 bytes)

The stat counter display used to be restricted both by the
statistics_display_counter global setting, and the current users access
right to statistics. Since this access right is kept in the HEAD version
of the module, I doubt it was not intended to only print out the view
number to those with proper access rights. This simple patch adds the
proper check.

View: http://drupal.org/node/15963
Edit: http://drupal.org/project/comments/add/15963

More information about the drupal-devel mailing list