Configuration on a content type
Node authlinks for a node

Generates links for view, edit, or delete content without login.

Module maintains authorization key for every node and gives additional grants (view/edit/delete) to every user (anonymous too) who accesses page with correct key in URL. Module offers function node_authlink_get_url($node, $op = 'view') for generate absolute URL to selected operation (e.g. for e-mail notifications).

Authkeys are generated for every node (in configured content type) once for all operations. In content type form you can configure which operations to allow and automatic expiration of keys.

Limitations

Currently, the module decorates the "access_check.entity" to allow access if auth key is detected. This works well for viewing operations, but it can fail when editing or removing when other entities or permissions are involved. For example, editing nodes with media or with Content Moderation may fail.

This module works specially well to give access to content that's being moderated to people that don't even have a user in the site.

How to get keys?

Keys are stored in database, you can get them by these functions:

 131 /**
 132  * Loads key from NID.
 133  */
 134 function node_authlink_load_authkey($nid)

 140 /**
 141  * Get edit URL of specified node.
 142  * @param $node Node object or NID.
 143  * @param $op Operation to do with node. view, edit (default) or delete.
 144  */
 145 function node_authlink_get_url($node, $op = 'update')

If you want to use Rules (such as send auth URL to e-mail) you have to use PHP snippet with one of functions above.

Supporting organizations: 
Support Drupal 8 version and Drupal 10 release

Project information

Releases