Seperate permission from taxonomy

ssherriff - October 14, 2008 - 09:50
Project:Taxonomy hide
Version:6.x-1.0
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs work
Description

I'm not sure if anyone else would like this feature, but I figured I would post it and see. I have a site where I want to have a user able to update taxonomy, but they won't understand what taxonomy_hide is and why it is happening. I don't really want them to even see anything confusing. The permissions are joined though.

I can provide a patch (as I have already made the necessary changes in my own copy) if needed.

Cheers,
Stephanie

#1

brmassa - October 27, 2008 - 18:32
Status:active» needs work

Stephanie,

i like this idea and i would like to see your patch, yes!

regards,

massa

#2

ssherriff - January 5, 2009 - 09:08

Sorry, my current CVS client doesn't do patches for the free version, and I only use CVS for a handful of Drupal projects, so the best I can do for now is put in the code.

This is the hook_perm function, I just put it above the hook_menu function:

/**
* Implementation of hook_perm().
*/
function taxonomy_hide_perm() {
  return array('administer taxonomy hide');
}

Then in the hook menu function I changed this line:

'access arguments'  => array('administer taxonomy'),

to this:

'access arguments'  => array('administer taxonomy hide'),

That's it!

#3

futuresoon - January 31, 2009 - 19:26

here's a patch for this if anybody wants it

AttachmentSize
320996.patch 1.07 KB
 
 

Drupal is a registered trademark of Dries Buytaert.