0

I have two specific user types on my website: "Manager" and "Employee". I will have ten managers and 100 employees. Each Manager will manage 10 employees.

Employees will have permissions to create "Content Type A" nodes. I want their managers to be able to edit/view only those "Content Type A" nodes that were created by their employees.

I created a User Reference field in the profile form. that UR field is populated only with the names of the Managers. When a new employee is registered their manager's name will be selected from that UR field.

I feel like I should be able to control each Manager's access to Employee-created content based on that UR value in each employee's profile, but I can't quite wrap my head around how to accomplish that. Would Views be the best bet, or would I need to develop a custom permissions module that compares the logged-in Manager's UID with the UID related to the Manager selected in the UR field on the employee profile? Or perhaps some kind of Rules setup?

Thanks!

3

User Relationships module seems to be the answer:

  • User Relationship Node Access lets users control access to their content based on relationships
  • thanks for your input. It appears that the User Relationships module may be just what I am looking for. I will post back here with my method if it does indeed work out. Thanks! – hockey2112 May 15 '13 at 17:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.