How do I give a specific user editing rights to a specific node?

Paul picture Paul · Feb 18, 2010 · Viewed 18.6k times · Source

How do I give a specific user editing rights to a specific node?

I have a user role named "Student". Multiple users have that role, only a few of them can edit a node. How can I realise this?

Answer

gapple picture gapple · Feb 18, 2010

I'll try and cover a few use cases, with how I would solve them:

  1. If all members of a category of users can edit any node of a certain type
    • Create a new role for that subset of users ('Super Students', as Emyr suggested) and grant them 'Edit content of type' permissions through Drupal's core permission system (no node access module required)
  2. If all members of a category of users can edit specific nodes
    • Create a new role for that subset of users and grant them edit permissions on the specific nodes (a node access modules is required, such as Node Access or Content Access). This will also require that someone has the permissions (and time) to grant access to the role whenever a new node is created.
  3. Some users can edit some nodes; there is no 'elite' group of users who can edit all nodes, and not all members can edit the same nodes
    • This will require a node access module, such as Node Access or Content Access with ACL. There will also need to be administrative users who have the permission to grant other users access to edit the nodes.
  4. Allow users to grant others access to edit a node they have created.
    • I implemented this recently with a user reference CCK field and Node Access User Reference. You can grant users permission to edit their own nodes through the core permissions system and they can then add other users to the user reference field. In my case creators are not given that permission and I set up the default value of the field to the creator's user id, which allows a user to remove themselves from being able to edit the node.

These all assume there is no categorization for your content. You may be able to utilize node access modules based on Taxonomy or Organic Groups if your content and users are organized sufficiently.