Deny access to 'node' and 'node/add' URLs for non admin users
This commit is contained in:
parent
86b7e754b6
commit
0ac7a5d805
4 changed files with 13 additions and 11 deletions
|
@ -1276,10 +1276,10 @@ function node_search($op = 'search', $keys = NULL) {
|
|||
$join2 .= ' LEFT JOIN {node_counter} nc ON nc.nid = i.sid';
|
||||
$total += $weight;
|
||||
}
|
||||
|
||||
// When all search factors are disabled (ie they have a weight of zero),
|
||||
// the default score is based only on keyword relevance and there is no need to
|
||||
// adjust the score of each item.
|
||||
|
||||
// When all search factors are disabled (ie they have a weight of zero),
|
||||
// the default score is based only on keyword relevance and there is no need to
|
||||
// adjust the score of each item.
|
||||
if ($total == 0) {
|
||||
$select2 = 'i.relevance AS score';
|
||||
$total = 1;
|
||||
|
@ -1287,7 +1287,7 @@ function node_search($op = 'search', $keys = NULL) {
|
|||
else {
|
||||
$select2 = implode(' + ', $ranking) . ' AS score';
|
||||
}
|
||||
|
||||
|
||||
// Do search.
|
||||
$find = do_search($keys, 'node', 'INNER JOIN {node} n ON n.nid = i.sid '. $join1, $conditions1 . (empty($where1) ? '' : ' AND '. $where1), $arguments1, $select2, $join2, $arguments2);
|
||||
|
||||
|
@ -1487,13 +1487,13 @@ function node_menu() {
|
|||
$items['node'] = array(
|
||||
'title' => 'Content',
|
||||
'page callback' => 'node_page_default',
|
||||
'access arguments' => array('access content'),
|
||||
'access arguments' => array('administer content types'),
|
||||
'type' => MENU_CALLBACK,
|
||||
);
|
||||
$items['node/add'] = array(
|
||||
'title' => 'Create content',
|
||||
'page callback' => 'node_add_page',
|
||||
'access callback' => '_node_add_access',
|
||||
'access arguments' => array('administer content types'),
|
||||
'weight' => 1,
|
||||
'file' => 'node.pages.inc',
|
||||
);
|
||||
|
@ -1715,7 +1715,7 @@ function node_feed($nids = FALSE, $channel = array()) {
|
|||
$item->body = $content;
|
||||
unset($item->teaser);
|
||||
}
|
||||
|
||||
|
||||
// Allow modules to modify the fully-built node.
|
||||
node_invoke_nodeapi($item, 'alter', $teaser, FALSE);
|
||||
}
|
||||
|
|
|
@ -644,7 +644,7 @@ function stormevent_storm_dashboard_links($type) {
|
|||
'icon' => 'stormcalendar-item',
|
||||
'path' => 'calendar',
|
||||
'params' => array(),
|
||||
'access_arguments' => 'create stormevent content',
|
||||
'access_arguments' => 'Storm event: access',
|
||||
'node_type' => 'stormevent',
|
||||
'add_type' => 'stormevent',
|
||||
'map' => array(),
|
||||
|
|
|
@ -726,6 +726,8 @@ function stormexpense_storminvoice_auto_add($node, $invoice_nid = NULL) {
|
|||
|
||||
$count = count($new_invoice->items);
|
||||
|
||||
$new_invoice->items[$count] = new StdClass;
|
||||
|
||||
$new_invoice->items[$count]->description = $node->title;
|
||||
$new_invoice->items[$count]->amount = $node->amount;
|
||||
// Tax percent uses the values set on the expense.
|
||||
|
|
Reference in a new issue