Anonymous users can see a "Administer My Categories" link
jaredwiltshire - August 5, 2008 - 23:48
| Project: | Taxonomy Delegate |
| Version: | 6.x-1.3 |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | NancyDru |
| Status: | closed |
Jump to:
Description
Per as the title, when no one is logged in a "Administer My Categories" link still shows up in the Navigation menu. If its just a problem with my configuration let me know.
Thanks for the module by the way, it works really well and was exactly what I was looking for.

#1
OK, the problem stems from this piece of code in hook_menu(). I think there is a difference between Drupal 5 and Drupal 6 as to when hook_menu() is called. Drupal 5 used to call it on every page view but Drupal 6 only calls it when the module first gets enabled, the delegated roles are updated etc.
// User admin callback.$any = count(_taxonomy_delegate_my_vocabularies());
if ($any) {
$items['category_admin'] = array(
'title' => '@name',
'title arguments' => array('@name' => variable_get('taxonomy_delegate_menu', t('Administer My Categories'))),
'page callback' => 'taxonomy_delegate_mycategories',
'access arguments' => array('access content'),
);
}
This also means that unless the person who is delegating the roles is actually a member of a role the role wont actually be able to administer the taxonomy per as the way this module is supposed to work.
I think what this module needs for the Drupal 6 version is to remove the Delegation tab/hook and simply define a permision for each vocabulary.
'access arguments' => array('access content') would be changed to 'access arguments' => $array_of_all_vocab_permissions.
The Permissions page can then be used to assign certain roles to certain vocabularies. This will obviously require a fairly substantial rewrite.
#2
Seeing as the module doesnt work as designed, I'll change this to critical
#3
This is the same issue as http://drupal.org/node/286359
#4
#5
Looking into this, but it's low priority at the moment. Need this in the not-too-distant tho.
#6
Jared you were on the right track. A sudden inspiration told me to just create a new access callback function. It seems to have done the job.
temp
Automatically closed -- issue fixed for two weeks with no activity.
temp
Automatically closed -- issue fixed for two weeks with no activity.
#7
Automatically closed -- issue fixed for two weeks with no activity.