The access counter permission is not used.
There is a permission set called: access counter
With this NOT set, the following can be accessed:
- the counter block
But, the following cannot be accessed:
- the counter report
- the counter admin facilities
With this set, the following can be accessed:
- the counter block
But, the following cannot be accessed:
- the counter report
- the counter admin facilities
So, what on earth is the access counter for?
I searched the code and found that access counter is only used in the counter_perm hook, and never anywhere else.
I would like the access counter permission to give access to the counter report, though a separate permission called access report is probably better suited for that.
Patch instructions to use access counter permission to provide access to the report instead:
File: counter.module
26(o): return array('access counter', 'administer counter');
26(n): return array('access counter report', 'administer counter');
84(o): 'access arguments' => array('administer counter'),
84(n): 'access arguments' => array('access counter report'),
Comments
Comment #1
alberto56 commentedRight, the block should not be accessible if one doesn't have access counter permission.
Comment #2
drupalnesia commented6.x-2.9: Bug fix: Change 'administer whizzywig' to 'administer counter'
Bug fix: Replace 'counter_show_administer_only' to 'hide counter' in Permissions
To avoid misunderstanding then we use "Hide Counter" in Permissions page. This option also replace 'counter_show_administer_only' variable.
Mean, to hide Counter for selected role then just tick "Hide counter" check-box in User Management-Permissions.
Comment #3
alberto56 commentedI'm setting this to active because, as I see it, Drupal permissions should always add functionality and not remove it. Using the Hide counter permission causes some confusion. For example:
I would strongly suggest using "view counter" and not "hide counter".
Comment #4
Anonymous (not verified) commentedHas any progress been made to revert the 'hide' to 'view'? Or does one need to downgrade to a previous version?
Due to Drupal's cumulative permissions the only options now are for anon and authenticated to not see it and by checking authenticated, then all roles above can not see the counter either.
This module was being used on our site to show only the higher level users the counter block. Now even they can't see it.
Comment #5
drupalnesia commented@alberto56: you right
@Quartz: please try Counter 6.x-2.10
6.x-2.10: Bug fix: replace 'hide counter' to 'view counter' for compability with admin role module
Comment #6
drupalnesia commented6.x-2.11:
--------
Bug fix: if (!user_access('view counter') to if (!user_access('view counter'))
Bug fix: PostgreSQL INSERT INTO WHERE NOT EXISTS with right PostgreSQL syntax
Comment #7
Anonymous (not verified) commenteddrupal-id.com
Thank you very much. I appreciate such a prompt reply and fix.
Have installed 6.11 and it's all back to working the way it was :)