Active
Project:
Mediareference
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Nov 2010 at 16:13 UTC
Updated:
26 Nov 2010 at 16:13 UTC
You are using the following for checking permissions whether user has access to the content type:
if (!user_access("create $type_name content") ) {
return drupal_access_denied();
}
But this doesn't work for blog as it uses 'create blog entries' permission. The cleaner way of checking that would be a solution from 'node/add' menu item in node.module:
if (!user_access('create', $type_name) ) {
return drupal_access_denied();
}