--- menu_node_edit.module	2009-07-15 22:06:59.000000000 +0800
+++ menu_node_edit.module.new	2009-10-23 02:13:24.909694000 +0800
@@ -130,7 +130,7 @@ function menu_node_edit_user_page_access
  *   Boolean TRUE or FALSE.
  */
 function menu_node_edit_check($node, $account = NULL) {
-  $items = menu_node_edit_check_rules($node->nid, $account);
+  $items = menu_node_edit_check_rules($node, $account);
   // If nothing returned, we have no stake here, so return normal access control.
   if (empty($items)) {
     return node_access('update', $node, $account);
@@ -148,18 +148,18 @@ function menu_node_edit_check($node, $ac
 /**
  * Determine if this node is a menu item that is subject to our rules.
  *
- * @param $nid
- *   The node id being checked.
+ * @param $node
+ *   The node being checked.
  * @param $account
  *   The user account being checked (optional).
  * @return
  *   The necessary menu item information, or FALSE.
  */
-function menu_node_edit_check_rules($nid, $account = NULL) {
-  $items = menu_node_get_links($nid);
+function menu_node_edit_check_rules($node, $account = NULL) {
+  $items = menu_node_get_links($node->nid);
   $sections = menu_node_edit_get_sections();
   // In the following cases, this module makes no assertions.
-  if (empty($items) || empty($sections) || user_access('administer nodes', $account)) {
+  if (empty($items) || empty($sections) || node_access('update', $node, $account)) {
     return FALSE;
   }
   return $items;
