[development] different terms depending on $user data

Dave Cohen drupal at dave-cohen.com
Mon Jun 22 19:52:19 UTC 2009

Consider tac_lite.module as an example.  It uses hook_db_rewrite_sql() to hide some terms from some users.  Note that this hides the terms completely (i.e. when viewing a node you will not see the tags) rather than removing them only from forms (which should be done with hook_form_alter).


On Monday 22 June 2009 05:55:34 Lluís wrote:
> I need groups of users sharing a taxonomy, but not terms; the group is
> defined depending on their user profile; so I have been able to write
> a module using hook_node_grants and hook_node_write_perms to separate
> their content; but now I need them able to categorize it.
> So a user inside "one group" should be able to add terms (if their
> permissions allow him to do so) and that term should only be visible
> to his group.
> Any hint of how to achieve this is welcome.

More information about the development mailing list