Operations for this node type
tsavino - June 12, 2008 - 17:04
| Project: | IndexPage |
| Version: | 5.x-1.3 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
I found this when a anonymous user come to the site the Operation at the bottom of the page showed Create ne content and it should not, don't know if it is a bug but this is what I did to fix it
$links['indexpage-create'] = array(
'title' => t('Create a new entry'),
'href' => 'node/add/'. $type,
'attributes' => array('title' => t('Create a new !type node.', array('!type' => $type))),
'query' => $dest,
);And changed it to this.
if (user_access('administer content types')) {
$links['indexpage-create'] = array(
'title' => t('Create a new entry'),
'href' => 'node/add/'. $type,
'attributes' => array('title' => t('Create a new !type node.', array('!type' => $type))),
'query' => $dest,
);
}Hope this helps...

#1
Fix committed to both branches.
I would not allow anonymous users to IndexPage, unless you are absolutely certain it doesn't compromise the security of your site.
#2
Automatically closed -- issue fixed for two weeks with no activity.