I know about user_access API. I've written a module that should display some information only if the user has specific rights on the taxonomy.
To be more precise:
- we've created a vocabulary, say
- in this vocabulary
bookswe have a lot of terms, say for example
- we've created roles according to the terms, i.e. roles like
role for childrenand
role for cooking=> one role = one term.
- now I've written a module that should diplay a link to 'edit' or 'create' only if the user is logged, and if he has the rights based on the role (which heavily relies on the taxonomy access rights).
In short: in my
- I have to check if it's a node with
- if so, I have to read the associated term (there can be only one), let's take an example:
- if the user is logged in and has the permissions of editing nodes with the specific term (
childrenhere), the I display a text with a link like
edit this bookand another like like
create a children's book.
This is only the last part that is a problem to me.
Does the user access API call works flawlessly, and takes in account those rights, or do I have some specific calls to do? No API seems available for the taxonomy access control (TAC).
Maybe you have an example somewhere (didn't find one actually)?