From 8b8a2bd63443dc9defbba4b0ab03801955ae406a Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sat, 21 Aug 2004 16:04:12 +0000 Subject: [PATCH] - Patch #10187 by JonBob: bugfix: added missing permission check. --- modules/node.module | 4 ++++ modules/node/node.module | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/modules/node.module b/modules/node.module index 9ea8d10529b..62a9e5426c1 100644 --- a/modules/node.module +++ b/modules/node.module @@ -1590,6 +1590,10 @@ function node_access($op, $node = NULL) { return TRUE; } + if (!user_access('access content')) { + return FALSE; + } + // Can't use node_invoke(), because the access hook takes the $op parameter // before the $node parameter. $access = module_invoke(node_get_module_name($node), 'access', $op, $node); diff --git a/modules/node/node.module b/modules/node/node.module index 9ea8d10529b..62a9e5426c1 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -1590,6 +1590,10 @@ function node_access($op, $node = NULL) { return TRUE; } + if (!user_access('access content')) { + return FALSE; + } + // Can't use node_invoke(), because the access hook takes the $op parameter // before the $node parameter. $access = module_invoke(node_get_module_name($node), 'access', $op, $node);