diff --git a/og_moderation.module b/og_moderation.module index f1cb1d6..7db98d9 100644 --- a/og_moderation.module +++ b/og_moderation.module @@ -75,46 +75,6 @@ function og_moderation_form_alter(&$form, &$form_state, $form_id) { } /** - * Implements hook_node_access_records(). - */ -function og_moderation_node_access_records($node) { - if ($node->status == 0 && $gids = og_get_entity_groups('node', $node)) { - $grants = array(); - foreach($gids as $group_type => $values) { - foreach ($values as $gid) { - $grants[] = array( - 'realm' => 'og_view_any_unpublished_' . $node->type . '_content', - 'gid' => $gid, - 'grant_view' => 1, - 'grant_update' => 0, - 'grant_delete' => 0, - 'priority' => 0, - ); - } - } - return $grants; - } -} - -/** - * Implements hook_node_grants(). - */ -function og_moderation_node_grants($account, $op) { - $grants = array(); - if ($op == 'view' && $gids = og_get_entity_groups('user', $account)) { - $types = (empty($types) || $reset == TRUE) ? node_permissions_get_configured_types() : $types; - foreach($types as $type) { - foreach ($gids['node'] as $id => $gid) { - if (og_user_access('node', $gid, "view any unpublished $type content")) { - $grants['og_view_any_unpublished_' . $type . '_content'][] = array($gid); - } - } - } - } - return $grants; -} - -/** * Implements hook_menu_alter(). * * Modify menu items defined in other modules (in particular the Node and