If a node has public access, showing a link to it in a View is trivial. Showing the node link to only authenticated user is slightly harder, whereas Edit links are automatically hidden, because anonymous users do not usually have permission to edit the nodes.

My solution which may help others, is as follows:

  1. In Content types, using the CCK module, create a new text field. It can be given any name (eg. field_privatelink), and any default values. Just make sure it is not "required". (If you don't have CCK text fields installed, it may work with other field types)
  2. Ensuring that CCK "Content Permissions" sub-module is enabled, in permissions, make sure that the new field can be viewed only by authenticated users.
  3. In the Views editor, in the Fields section:
    • Add the field "Node: link", and set "Exclude from display" (otherwise it will be displayed to all users)
    • Add your new field, "Content: private_link". It must come after the "Node: link" field. Now select "Rewrite the output of this field", and enter the token "[view_node]". Now the node edit link will only appear to users who are authenticated to view the new private_link field.

Comments

esmerel’s picture

Component: node data » Documentation
Category: support » task

This looks like a candidate for advanced help! Thanks!

mustanggb’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)