0

Is there a way to for a normal user (without admin power) to set permissions for a specific piece of content (not a content type) so that it is only visible to a specific user? I want it so that said specific user can see content that has been specifically assigned to them in a table in a view.

3
  • I tried making using a select list with names of users so that a name could be selected and assigned for a certain content type. I then edited the view for the specific user so that it would filter content based on what name was assigned, but I realized that since the view was for everyone in a certain role, I couldn't users see only content that was assigned to them specifically. @keithm
    – theK_S
    Nov 30, 2015 at 19:26
  • Welcome to Drupal Answers! What do you mean by a specific piece of content?
    – apaderno
    Nov 30, 2015 at 21:03
  • By specific piece of content mean, for example, Basic Page A, instead of just basic pages in general. @kiamlaluno
    – theK_S
    Nov 30, 2015 at 21:15

2 Answers 2

0

You can do it by using these modules:

  • If you want to give permissions to node then you can use this module

    Node Access

Nodeaccess is a Drupal access control module which provides view, edit and delete access to nodes. Users with the 'grant node permissions' permission will have a grant tab on node pages which allows them to grant access to that node by user or role. Administrators can set default access controls per content type, and also define which roles are available to grant permissions to on the node grants tab.

  • If you want to "assign" node to some user, you can use user reference field and then in view add filter for that field and make it filter by current user.

For user reference use this field

References

There were a couple changes in the way 'References' views are handled ("referenceable nodes/users defined by a view"), which might require double-checking those existing on your site:

  • The 'label' (node title or user name) is no longer automatically added if not included in the view. If some of your 'References' views currently do not include it, you might want to add it explicitly,
    else it will no longer appear in the widgets.

  • The HTML generated by the view is no longer stripped out before being handed to "checkboxes / radios" widgets, thus allowing advanced formatting. You might want to check for Reference views having fields configured to display "as links", since the (probably unwanted) tags generated by Views are not removed anymore.

0

have you seen Field Permissions module ? visit https://www.drupal.org/project/field_permissions

by this module, you can add permissions to fields in order to visible/invisible part of content type.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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