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

Goba drupal-devel at drupal.org
Sat Jan 22 12:22:41 UTC 2005


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

Yes, I meant user_access(), sorry. There needs to be a way to hide the
view counters from those not authorized. Now if the view counters are
turned on, everyone can see the view counters, regardless of their
rights. If the counters are turned off, then noone can see the view
counters. This used to be working that only those with proper right can
see the counter if the counter is turned on. IMHO this should be
restored.

Goba



Previous comments:
------------------------------------------------------------------------

January 21, 2005 - 17: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.

------------------------------------------------------------------------

January 22, 2005 - 10:32 : Dries

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.

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





More information about the drupal-devel mailing list