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.
Project information
- Minimally maintained
Maintainers monitor issues, but fast responses are not guaranteed. - Module categories: Access Control
- 1,042 sites report using this module
- Created by Honza Pobořil on , updated
- Drupal 10 is here!
A Drupal 10 release will soon be ready! See https://www.drupal.org/project/node_authlink/issues/3365570.
- Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.
Releases
Development version: 2.x-dev updated 27 Oct 2023 at 12:27 UTC
Development version: 7.x-1.x-dev updated 18 Oct 2020 at 06:19 UTC