Index: plugins/access/page_403.inc
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- plugins/access/page_403.inc	(revision )
+++ plugins/access/page_403.inc	(revision )
@@ -0,0 +1,45 @@
+<?php
+
+/**
+ * @file
+ * Plugin to provide access control based on HTTP response code.
+ */
+
+/**
+ * Plugins are described by creating a $plugin array which will be used
+ * by the system that includes this file.
+ */
+$plugin = array(
+  'title' => t('403 Forbidden'),
+  'description' => t('Is this the "403 Forbidden" response code.'),
+  'callback' => 'ctools_page_403_ctools_access_check',
+  'settings form' => 'ctools_page_403_ctools_access_settings',
+  'summary' => 'ctools_page_403_ctools_access_summary',
+);
+
+/**
+ * Settings form for the '403 Forbidden' access plugin.
+ */
+function ctools_page_403_ctools_access_settings($form, &$form_state, $conf) {
+  // No additional configuration necessary.
+  return $form;
+}
+
+/**
+ * Check for access.
+ */
+function ctools_page_403_ctools_access_check($conf, $context) {
+  $response_code = drupal_get_http_header('status');
+  if ($response_code == '403 Forbidden') {
+    return TRUE;
+  }
+
+  return FALSE;
+}
+
+/**
+ * Provide a summary description based upon the checked response code.
+ */
+function ctools_page_403_ctools_access_summary($conf, $context) {
+  return t('The 403 Forbidden');
+}
Index: plugins/access/page_404.inc
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- plugins/access/page_404.inc	(revision )
+++ plugins/access/page_404.inc	(revision )
@@ -0,0 +1,45 @@
+<?php
+
+/**
+ * @file
+ * Plugin to provide access control based on HTTP response code.
+ */
+
+/**
+ * Plugins are described by creating a $plugin array which will be used
+ * by the system that includes this file.
+ */
+$plugin = array(
+  'title' => t('404 Not Found'),
+  'description' => t('Is this the "404 Not Found" response code.'),
+  'callback' => 'ctools_page_404_ctools_access_check',
+  'settings form' => 'ctools_page_404_ctools_access_settings',
+  'summary' => 'ctools_page_404_ctools_access_summary',
+);
+
+/**
+ * Settings form for the '404 Not Found' access plugin.
+ */
+function ctools_page_404_ctools_access_settings($form, &$form_state, $conf) {
+  // No additional configuration necessary.
+  return $form;
+}
+
+/**
+ * Check for access.
+ */
+function ctools_page_404_ctools_access_check($conf, $context) {
+  $response_code = drupal_get_http_header('status');
+  if ($response_code == '404 Not Found') {
+    return TRUE;
+  }
+
+  return FALSE;
+}
+
+/**
+ * Provide a summary description based upon the checked response code.
+ */
+function ctools_page_404_ctools_access_summary($conf, $context) {
+  return t('The 404 Not Found');
+}
