Commit 42191f7e authored by webchick's avatar webchick

#76422 by coreyp_1: Greet admin users with a prompt to create content types...

#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.
parent 17e60768
......@@ -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;
}
......
......@@ -43,6 +43,9 @@ function theme_node_add_list($content) {
}
$output .= '</dl>';
}
else {
$output = '<p>' . t('You have not created any content types yet. Please go to the <a href="@create-content">content type creation page</a> to add a new content type.', array('@create-content' => url('admin/structure/types/add'))) . '</p>';
}
return $output;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment