API function for checking content access

catch - April 22, 2009 - 09:31
Project:Restricted content
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Description

I have a site using both node_access and this module, and need to implement hook_file_download() to restrict access to file uploads based on the roles in restricted content. Currently the check is in hook_nodeapi() but would be great to have it abstracted to a function I can just use with an nid.

#1

Dave Reid - April 30, 2009 - 15:57
Status:active» fixed

Fixed in with http://drupal.org/cvs?commit=205216. The new function is restricted_content_node_access($nid, $account = NULL) which will return TRUE if the user has access to the node, or FALSE otherwise.

#2

System Message - May 14, 2009 - 16:00
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.