From 42191f7ed1f5f9edcc3d3626d3857e05fc3c29b9 Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Tue, 4 Aug 2009 06:44:48 +0000 Subject: #76422 by coreyp_1: Greet admin users with a prompt to create content types rather than an access denied page when no content types exist on node/add. --- modules/node/node.module | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'modules/node/node.module') diff --git a/modules/node/node.module b/modules/node/node.module index 19c636fa7..5d8f3b5a7 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -1649,6 +1649,12 @@ function _node_add_access() { return TRUE; } } + if (user_access('administer content types')) { + // There are no content types defined that the user has permission to create, + // but the user does have the permission to administer the content types, so + // grant them access to the page anyway. + return TRUE; + } return FALSE; } -- cgit v1.2.3