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
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

jaredwiltshire - August 6, 2008 - 04:39

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

jaredwiltshire - August 6, 2008 - 23:48
Priority:normal» critical

Seeing as the module doesnt work as designed, I'll change this to critical

#3

jaredwiltshire - August 7, 2008 - 05:51
Status:active» duplicate

This is the same issue as http://drupal.org/node/286359

#4

NancyDru - August 28, 2008 - 16:00
Status:duplicate» active

#5

NikLP - September 11, 2008 - 15:44

Looking into this, but it's low priority at the moment. Need this in the not-too-distant tho.

#6

NancyDru - September 15, 2008 - 18:38
Assigned to:Anonymous» NancyDru
Status:active» fixed

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

Anonymous (not verified) - September 29, 2008 - 18:43

Automatically closed -- issue fixed for two weeks with no activity.

temp

Anonymous (not verified) - September 29, 2008 - 18:53

Automatically closed -- issue fixed for two weeks with no activity.

#7

Anonymous (not verified) - September 29, 2008 - 19:12
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.