Custom field: users organized into departments I'm building an intranet corporate site, and need to have users linked to departments. The easy way I see this to be done is to create a taxonomy vocabulary with list of departments, and then add custom field to user entity, linking it with corresponding department from departments vocabulary.

Now I want to add a "Person responsible" field to a custom content type (let's name it "Document"), which should be a list of users, organized by departments.

In future a need to use this field to control access to the document may arise.



So, the questions are:


Is my method to link users to departments good enough, or are there better ways? (as this is now in development, I can change everything painlessly).
What is the best way to make "Person responsible" field (a list of users, organized by departments).
Does all this play well with possible future access control needs?
Add a "grouping" to the table settings if you want to group by department etc.



(You would probably want to hide the department field in this case.)

Using taxonomy for user->department relationship sounds fine, and use Views to make all your lists of users/departments (group by):


Make a Vocabulary "Departments" and add some terms to it


Make a Person content type
Add a field to Person which is a taxonomy reference to the Department vocabulary


Download and enable the entityreference module
Modify the fields of the Vocabulary to add a field, which is an entity-reference to a Person node
Call it Person Responsible 


Create some content to test with: Create some People, attach them to Departments, then edit the Departments (terms) to assign people responsible
Download and enable the Views module
Create a View of content, of type person. Add title+department fields
Add a relationship to the view "Content: Department"
Add the Person Responsible field to the view, using the relationship you just added




From discussion in IRC, I misunderstood the requirement around Document. It's simpler than described above. Just do:


Create Department vocabulary; add some terms
Create Person content type; add a taxonomy field referencing the Department vocabulary
Create the Document content type; add an entity reference field referencing nodes of type Person
Use Views to display, including "looking through" the entity reference