Skip to content

Instantly share code, notes, and snippets.

@mrfelton
Created September 16, 2014 08:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrfelton/edbf31ed2d7ab6a753f6 to your computer and use it in GitHub Desktop.
Save mrfelton/edbf31ed2d7ab6a753f6 to your computer and use it in GitHub Desktop.
diff --git a/modules/pantheon/pantheon_apachesolr/pantheon_apachesolr.module b/modules/pantheon/pantheon_apachesolr/pantheon_apachesolr.module
index e3e732c..97bd383 100644
--- a/modules/pantheon/pantheon_apachesolr/pantheon_apachesolr.module
+++ b/modules/pantheon/pantheon_apachesolr/pantheon_apachesolr.module
@@ -72,6 +72,18 @@ function pantheon_apachesolr_help($path, $arg) {
}
/**
+ * Implemenets hook_permission().
+ */
+function pantheon_apachesolr_permission() {
+ return array(
+ 'administer pantheon apachesolr' => array(
+ 'title' => t('Administer Pantheon ApacheSolr'),
+ 'description' => t('Access to administer pages of pantheon apachesolr.'),
+ ),
+ );
+}
+
+/**
* Implements hook_menu().
*/
function pantheon_apachesolr_menu() {
@@ -82,7 +94,7 @@ function pantheon_apachesolr_menu() {
'description' => 'Check communication with Pantheon\'s Apache Solr Service',
'page callback' => 'drupal_get_form',
'page arguments' => array('pantheon_apachesolr_status'),
- 'access arguments' => array('administer search'),
+ 'access arguments' => array('administer pantheon apachesolr'),
);
$items['admin/config/search/pantheon/status'] = array(
@@ -96,7 +108,7 @@ function pantheon_apachesolr_menu() {
'description' => "Post schema.xml to Pantheon's Apache Solr Service",
'page callback' => 'drupal_get_form',
'page arguments' => array('pantheon_apachesolr_post_schema_form'),
- 'access arguments' => array('administer search'),
+ 'access arguments' => array('administer pantheon apachesolr'),
'type' => MENU_LOCAL_TASK,
'weight' => 10,
);
@@ -106,7 +118,7 @@ function pantheon_apachesolr_menu() {
'description' => "Send raw query string Pantheon's Apache Solr Service for debugging",
'page callback' => 'drupal_get_form',
'page arguments' => array('pantheon_apachesolr_query'),
- 'access arguments' => array('administer search'),
+ 'access arguments' => array('administer pantheon apachesolr'),
'type' => MENU_LOCAL_TASK,
'weight' => 11,
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment