commit 64d402526cf668ed34f658c1326cf98051b0b779
Author: Letharion <letharion@gmail.com>
Date:   Wed Feb 1 22:01:41 2012 +0100

    Adding a $node->status access plugin

diff --git a/plugins/access/node_status.inc b/plugins/access/node_status.inc
new file mode 100644
index 0000000..f426c39
--- /dev/null
+++ b/plugins/access/node_status.inc
@@ -0,0 +1,36 @@
+<?php
+
+/**
+ * @file
+ * Plugin to provide access control based upon node type.
+ */
+
+/**
+ * Plugins are described by creating a $plugin array which will be used
+ * by the system that includes this file.
+ */
+$plugin = array(
+  'title' => t("Node: (un)published"),
+  'description' => t('Control access by the nodes published status.'),
+  'callback' => 'ctools_node_status_ctools_access_check',
+  'default' => array('type' => 'view'),
+  'summary' => 'ctools_node_status_ctools_access_summary',
+  'required context' => array(
+    new ctools_context_required(t('Node'), 'node'),
+  ),
+);
+
+/**
+ * Check for access.
+ */
+function ctools_node_status_ctools_access_check($conf, $context) {
+  return (!empty($context->data) && $context->data->status);
+}
+
+/**
+ * Provide a summary description based upon the checked node_statuss.
+ */
+function ctools_node_status_ctools_access_summary($conf, $context) {
+  return t('Returns true if the node is published.');
+}
+
