Hi, I'm doing a simple module that allow taxonomy term locking. By locking understand that it allow only users with a new permission to move or edit them, but all other terms remains still editable by anyone with the 'administer taxonomy' permission. It uses the hook_taxonomy() and alter the main taxonomy term list overview to handle locked positions for some terms. The goal of this module is to intensively use taxonomy_menu, but with finer permissions, and locked subtrees. I looked up a bit on modules that exists, I did not found such module, the fact is we are going to use it for many projects. Does anyone is interested in me commiting it on drupal.org? Pierre.
I'm a bit curious about the way you were able to do this using hook_taxonomy() since that hook is always called after the fact, meaning any "locked" operation has already been committed to the DB once your code is called. Whatever the implementation, though, I do not think this belongs in core: extra access control modules like this one (cck field perms or profile perms, for instance) are in contrib already. ________________________________________ De : development-bounces@drupal.org [development-bounces@drupal.org] de la part de Pierre Rineau [pierre.rineau@makina-corpus.com] Date d'envoi : jeudi 6 août 2009 10:14 À : development@drupal.org Objet : [development] New module Hi, I'm doing a simple module that allow taxonomy term locking. By locking understand that it allow only users with a new permission to move or edit them, but all other terms remains still editable by anyone with the 'administer taxonomy' permission. It uses the hook_taxonomy() and alter the main taxonomy term list overview to handle locked positions for some terms. The goal of this module is to intensively use taxonomy_menu, but with finer permissions, and locked subtrees. I looked up a bit on modules that exists, I did not found such module, the fact is we are going to use it for many projects. Does anyone is interested in me commiting it on drupal.org? Pierre.
By commiting it, I meant commiting it as a contrib module. The fact is I control mainly the UIs, other modules could modify my terms without me knowing it. That's why I implement an "aggressive behavior" (enabled or disabled) which allow the hook to restore full last known term data when another module is modified it (understand when there is not the lock data into the $array value in the hook_taxonomy()). This module could be someway dangerous to use with intensive taxonomy modules, that's why I'm encapsulating all the settings in a 'per vocabulary' basis. But, I did some searches, I did not found such module, all taxonomy access modules are always per vocabulary based, or are just some tool to build strong node access rules, this is not why I needed. PS: I left some messages some days ago about a migration module, which I'm going to commit something like in one week (for people interested). Regards, Pierre. On Thu, 2009-08-06 at 10:37 +0200, fgm wrote:
I'm a bit curious about the way you were able to do this using hook_taxonomy() since that hook is always called after the fact, meaning any "locked" operation has already been committed to the DB once your code is called.
Whatever the implementation, though, I do not think this belongs in core: extra access control modules like this one (cck field perms or profile perms, for instance) are in contrib already.
________________________________________ De : development-bounces@drupal.org [development-bounces@drupal.org] de la part de Pierre Rineau [pierre.rineau@makina-corpus.com] Date d'envoi : jeudi 6 août 2009 10:14 À : development@drupal.org Objet : [development] New module
Hi,
I'm doing a simple module that allow taxonomy term locking. By locking understand that it allow only users with a new permission to move or edit them, but all other terms remains still editable by anyone with the 'administer taxonomy' permission.
It uses the hook_taxonomy() and alter the main taxonomy term list overview to handle locked positions for some terms.
The goal of this module is to intensively use taxonomy_menu, but with finer permissions, and locked subtrees.
I looked up a bit on modules that exists, I did not found such module, the fact is we are going to use it for many projects.
Does anyone is interested in me commiting it on drupal.org?
Pierre.
Pierre, While I don't necessarily intend to use this module, I can think of several cases in which this ability could be useful. I think it would have a good place in Drupal's contributions archive. Brian Pierre Rineau wrote:
Hi,
I'm doing a simple module that allow taxonomy term locking. By locking understand that it allow only users with a new permission to move or edit them, but all other terms remains still editable by anyone with the 'administer taxonomy' permission.
It uses the hook_taxonomy() and alter the main taxonomy term list overview to handle locked positions for some terms.
The goal of this module is to intensively use taxonomy_menu, but with finer permissions, and locked subtrees.
I looked up a bit on modules that exists, I did not found such module, the fact is we are going to use it for many projects.
Does anyone is interested in me commiting it on drupal.org?
Pierre.
First, thanks for your answer (to fgm too btw). Ok, I'll commit it as soon as we tested it a bit more. Regards, Pierre. On Thu, 2009-08-06 at 09:40 -0400, Brian Vuyk wrote:
Pierre,
While I don't necessarily intend to use this module, I can think of several cases in which this ability could be useful. I think it would have a good place in Drupal's contributions archive.
Brian
Pierre Rineau wrote:
Hi,
I'm doing a simple module that allow taxonomy term locking. By locking understand that it allow only users with a new permission to move or edit them, but all other terms remains still editable by anyone with the 'administer taxonomy' permission.
It uses the hook_taxonomy() and alter the main taxonomy term list overview to handle locked positions for some terms.
The goal of this module is to intensively use taxonomy_menu, but with finer permissions, and locked subtrees.
I looked up a bit on modules that exists, I did not found such module, the fact is we are going to use it for many projects.
Does anyone is interested in me commiting it on drupal.org?
Pierre.
Hi, For those interested, I released the module I was talking some days ago. You can find it on: http://drupal.org/project/term_lock Again, this is kind of a specific module, but some people could be interested in it. Pierre. On Thu, 2009-08-06 at 10:14 +0200, Pierre Rineau wrote:
Hi,
I'm doing a simple module that allow taxonomy term locking. By locking understand that it allow only users with a new permission to move or edit them, but all other terms remains still editable by anyone with the 'administer taxonomy' permission.
It uses the hook_taxonomy() and alter the main taxonomy term list overview to handle locked positions for some terms.
The goal of this module is to intensively use taxonomy_menu, but with finer permissions, and locked subtrees.
I looked up a bit on modules that exists, I did not found such module, the fact is we are going to use it for many projects.
Does anyone is interested in me commiting it on drupal.org?
Pierre.
participants (3)
-
Brian Vuyk -
fgm -
Pierre Rineau