Q&A/ticket system help with permissions I am trying to build a Q&amp;A / Ticket System with custom nodes.
the current status is:

Nodes:


Company: on the company node you get a link with "I want to ask a question"
Question: on the question node you get a link with "add comment"
Comment: on the comment node you get a link with "add comment"


Multiple comments create a thread.

The relation is made with Node Reference URL Widget. The question node has a reference to  company. The comment node has a reference to question.

I have 2 user roles:


Company
Clients


Companies can only react on questions and comments related to themselves. e.g. pcpower can only react on questions for them and not on those asked to pcworld.

How can this permission be accomplished. For now a company can react on all questions.

Clients: can ask questions to anyone (is working) BUT must only reply on comments/reactions on subjects created by them.

At this moment clients can make comment to any question or comment in the system.

Any help regarding to this would be really helpful.

Kind regards,
Jos
You could accomplish this with a custom node.tpl.php for the content types - whereby it checks if the author of the node is the currently logged in user, and if not, it doesn't display the comments links (or the comments all together).