I noticed on our site logs that some users were getting an 'access denied' warning along the lines of: Message: taxonomy_similar/node/nid denied access.

I have our site setup for free tagging on blog posts, as well as having controlled vocabularies for section and topic. Using this module, when a authenticated user submits a blog with or without freetags, they are redirected to the url: /taxonomy_similar/node/nid. At which point Drupal prints a message something along the lines of:

Access denied
Your personal blog entry was created.
You are not authorized to access this page.

I traced the problem to the way hook_menu() is implemented in the taxonomy_similar.module, 'access' is set to user_access('administer nodes'). In my setup, I cannot allow all users who will be using free tags in their blogs to gain this permission, so after a quick review of the availible permissions I chose to change it to 'edit own blog' for now on our site.

Is there a better way? Perhaps the module could add its own permission, instead of using a low level permission like 'administer nodes'?

Comments

morbus iff’s picture

Assigned: Unassigned » morbus iff

A 'choose similar tags' permission has been added in CVS. Try it out and lemme know.

grohk’s picture

Looking good Morbus. Thanks for the quick fix!

grohk’s picture

Whoops. Looks like I may have spoken too soon. I am getting a blank page (no output whatsoever) on node submit or update.

morbus iff’s picture

That sounds like a PHP error then - could you check/enable your PHP error log and tell me what you see? Incidentally, have you just recently updated to the latest CVS? A commit of about two weeks ago caused a known problem with my freetagging code, and my patch to fix it is at the bottom of http://drupal.org/node/19621.

grohk’s picture

Morbus, I have not seen any php errors in the Drupal logs or on screen. I should mention that I am using the backport of folksonomy for 4.6 with the cvs version of this module. I am going to upgrade my testbed site to HEAD to see if I can replicate this issue and report back.

grohk’s picture

Morbus, I cannot replicate this in HEAD...So I am marking this is fixed since I am using it in a bastard way. I don't have enough cajones to upgrade to HEAD, so I am going to have to wait for 4.7 (or whatever it ends up being called) to use this module on my main site.

Thanks for the help.

Anonymous’s picture