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

ghing - August 4, 2009 - 16:29

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).

AttachmentSize
links_related_adding_permissions.patch 4.72 KB

#2

ghing - August 11, 2009 - 20:07

I updated my patch to eliminate an error message that occurred when a user without the 'add related links' permission saved a node.

AttachmentSize
links_related_adding_permissions-2.patch 5.11 KB
 
 

Drupal is a registered trademark of Dries Buytaert.