Quantcast
Viewing latest article 7
Browse Latest Browse All 22

Controlling access to nodes by simple user relationships

I looking for solution or ideas about how to solve this problem in Drupal 7.

I am going to have a site where users will be working in pairs. One user(Poster) will be posting nodes and another user(Viewer) should have View access to posters nodes. Nobody else outside of these 2 users should be able View the the Posters nodes.

I have thought using the User Relationship module, but it seems overly complicated for what I am trying and would present other problems for my purposes.

I have thought about solving this problem with custom code and the ACL module.
Here is my idea for that:

<

ol>

  • Add User Reference field on the User object that would only be available to users who have the Poster role.
  • Each Poster would have ACL list for their nodes
  • Add the User referenced in the User Reference Field above to the ACL list for the Poster.
  • When the Poster adds a node. It would added it to their ACL list
  • <

    ol>

    I am not sure if this is a bad idea to have list for each user with the Role Poster(half the users on the site).

    Any ideas?

    Thanks


    Viewing latest article 7
    Browse Latest Browse All 22

    Trending Articles