Permissions for adding related links to nodes
ghing - August 4, 2009 - 15:17
| Project: | Links Package |
| Version: | 6.x-1.2 |
| Component: | Code: links_related.module |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
| Issue tags: | links related access permission restriction |
Description
It would be nice to be able to restrict access to the "Related Links" form that appears when adding/editing nodes on a per-role basis.

#1
I've created a patch adding this basic functionality. To do this I implemented links_related_perm() in order to add the permission "add related links". I then modifed links_related_form_alter() to check for this permission before adding the related links form to the node add/edit form (form id NODE_TYPE_node_form).
#2
I updated my patch to eliminate an error message that occurred when a user without the 'add related links' permission saved a node.