From e7d04b9d12da9337667906b3853c89690a151339 Mon Sep 17 00:00:00 2001
From: Dave Reid <dave@davereid.net>
Date: Fri, 17 Jun 2011 08:41:05 -0500
Subject: [PATCH] Issue #1191494 by twistor, Dave Reid: Fixed link to node type
 feed importer did not use node_access().

---
 feeds.pages.inc | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/feeds.pages.inc b/feeds.pages.inc
index 547737c1..33310ecf 100644
--- a/feeds.pages.inc
+++ b/feeds.pages.inc
@@ -22,10 +22,13 @@ function feeds_page() {
         $link = 'import/' . $importer->id;
         $title = $importer->config['name'];
       }
-      elseif (user_access('create ' . $importer->config['content_type'] . ' content')) {
+      elseif (node_access('create', $importer->config['content_type'])) {
         $link = 'node/add/' . str_replace('_', '-', $importer->config['content_type']);
         $title = node_type_get_name($importer->config['content_type']);
       }
+      else {
+        continue;
+      }
       $rows[] = array(
         l($title, $link),
         check_plain($importer->config['description']),
-- 
GitLab