Browse Source

Fixed access arguments for all menu items

Stephen Ficklin 11 years ago
parent
commit
6bbb3eb45b

+ 3 - 3
tripal_analysis/tripal_analysis.module

@@ -39,7 +39,7 @@ function tripal_analysis_menu() {
     'title' => 'Analyses',
     'description' => 'A bioinformatics analysis producing features.',
     'page callback' => 'tripal_analysis_admin_analysis_view',
-    'access arguments' => array('administer tripal analyses'),
+    'access arguments' => array('administer tripal analysis'),
     'type' => MENU_NORMAL_ITEM,
   );
 
@@ -48,7 +48,7 @@ function tripal_analysis_menu() {
     'description' => "A description of the Tripal Analysis module including a short description of it's usage.",
     'page callback' => 'theme',
     'page arguments' => array('tripal_analysis_help'),
-    'access arguments' => array('administer tripal analyses'),
+    'access arguments' => array('administer tripal analysis'),
     'type' => MENU_LOCAL_TASK,
     'weight' => 10,
   );
@@ -58,7 +58,7 @@ function tripal_analysis_menu() {
     'description' => 'Settings for the displays of analysis results.',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('tripal_analysis_admin'),
-    'access arguments' => array('administer tripal analyses'),
+    'access arguments' => array('administer tripal analysis'),
     'type' => MENU_LOCAL_TASK,
     'weight' => 5
   );

+ 3 - 21
tripal_contact/tripal_contact.module

@@ -62,7 +62,7 @@ function tripal_contact_menu() {
     'title' => 'Contacts',
     'description' => ('Model persons, institutes, groups, organizations, etc.'),
     'page callback' => 'tripal_contact_admin_contact_view',
-    'access arguments' => array('administer tripal contacts'),
+    'access arguments' => array('administer tripal contact'),
     'type' => MENU_NORMAL_ITEM
   );
 
@@ -81,7 +81,7 @@ function tripal_contact_menu() {
     'description' => ('Help with the contact module.'),
     'page callback' => 'theme',
     'page arguments' => array('tripal_contact_help'),
-    'access arguments' => array('administer tripal contacts'),
+    'access arguments' => array('administer tripal contact'),
     'type' => MENU_LOCAL_TASK,
     'weight' => 10
   );
@@ -91,7 +91,7 @@ function tripal_contact_menu() {
     'description' => 'Sync contacts in Chado with Drupal',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('tripal_contact_sync_form'),
-    'access arguments' => array('administer tripal contacts'),
+    'access arguments' => array('administer tripal contact'),
     'type' => MENU_LOCAL_TASK,
     'weight' => 0
   );
@@ -106,24 +106,6 @@ function tripal_contact_menu() {
     'weight' => 2
   );
 
-  // AJAX calls for adding/removing properties to a contact
-  $items['tripal_contact/properties/add'] = array(
-    'page callback' => 'tripal_contact_property_add',
-    'access arguments' => array('edit chado_contact content'),
-    'type ' => MENU_CALLBACK,
-  );
-  $items['tripal_contact/properties/description'] = array(
-    'page callback' => 'tripal_contact_property_get_description',
-    'access arguments' => array('edit chado_contact content'),
-    'type ' => MENU_CALLBACK,
-  );
-  $items['tripal_contact/properties/minus/%/%'] = array(
-    'page callback' => 'tripal_contact_property_delete',
-    'page arguments' => array(3, 4),
-    'access arguments' => array('edit chado_contact content'),
-    'type ' => MENU_CALLBACK,
-  );
-
   return $items;
 }
 

+ 32 - 28
tripal_core/tripal_core.module

@@ -150,7 +150,7 @@ function tripal_core_menu() {
     'description' => "Manage the behavior or Tripal and its various modules.",
     'weight' => -8,
     'page callback' => 'system_admin_menu_block_page',
-    'access arguments' => array('administer site configuration'),
+    'access arguments' => array('administer tripal'),
     'file' => 'system.admin.inc',
     'file path' => drupal_get_path('module', 'system'),
   );
@@ -158,26 +158,26 @@ function tripal_core_menu() {
     'title' => 'Chado Schema',
     'description' => "Tools to extend the chado schema through custom tables & materialized views.",
     'weight' => -2,
-    'access arguments' => array('administer site configuration'),
+    'access arguments' => array('administer tripal'),
   );
   $items['admin/tripal/chado'] = array(
     'title' => 'Chado Modules',
     'description' => 'Configuration for specific chado data types such as Vocabularies, Features, etc.',
-    'access arguments' => array('access administration pages'),
+    'access arguments' => array('administer tripal'),
     'type' => MENU_NORMAL_ITEM,
     'weight' => -6
   );
   $items['admin/tripal/loaders'] = array(
     'title' => 'Chado Data Loaders',
     'description' => 'Tools facilitating loading data into the chado database. Includes a generic tab-delimited loader (Bulk Loader).',
-    'access arguments' => array('access administration pages'),
+    'access arguments' => array('administer tripal'),
     'type' => MENU_NORMAL_ITEM,
     'weight' => -4
   );
   $items['admin/tripal/extension'] = array(
     'title' => 'Extension Modules',
     'description' => 'Configuration for Tripal extension modules.',
-    'access arguments' => array('access administration pages'),
+    'access arguments' => array('administer tripal'),
     'type' => MENU_NORMAL_ITEM,
     'weight' => 0
   );
@@ -186,7 +186,7 @@ function tripal_core_menu() {
   $items['admin/tripal/setup'] = array(
     'title' => 'Setup Tripal',
     'description' => 'Tools for initial setup of Tripal',
-    'access arguments' => array('administer site configuration'),
+    'access arguments' => array('administer tripal'),
     'weight' => -8
   );
   $items['admin/tripal/setup/customize'] = array(
@@ -194,7 +194,7 @@ function tripal_core_menu() {
     'description' => 'Information on how to customize tripal',
     'page callback' => 'theme',
     'page arguments' => array('tripal_core_customize'),
-    'access arguments' => array('administer site configuration'),
+    'access arguments' => array('administer tripal'),
     'weight' => 10
   );
   $items['admin/tripal/setup/chado_install'] = array(
@@ -212,7 +212,7 @@ function tripal_core_menu() {
     'title' => 'Jobs',
     'description' => 'Jobs managed by Tripal',
     'page callback' => 'tripal_jobs_admin_view',
-    'access arguments' => array('access administration pages'),
+    'access arguments' => array('administer tripal'),
     'type' => MENU_NORMAL_ITEM,
     'weight' => -10
   );
@@ -221,7 +221,7 @@ function tripal_core_menu() {
     'description' => 'Help for the tripal job management system',
     'page callback' => 'theme',
     'page arguments' => array('tripal_core_job_help'),
-    'access arguments' => array('access administration pages'),
+    'access arguments' => array('administer tripal'),
     'type' => MENU_LOCAL_TASK,
     'weight' => 10
   );
@@ -230,7 +230,7 @@ function tripal_core_menu() {
     'description' => 'Cancel a pending job',
     'page callback' => 'tripal_jobs_cancel',
     'page arguments' => array(4),
-    'access arguments' => array('access administration pages'),
+    'access arguments' => array('administer tripal'),
     'type' => MENU_CALLBACK,
   );
   $items['admin/tripal/tripal_jobs/rerun/%'] = array(
@@ -238,7 +238,7 @@ function tripal_core_menu() {
     'description' => 'Re-run an existing job.',
     'page callback' => 'tripal_jobs_rerun',
     'page arguments' => array(4),
-    'access arguments' => array('access administration pages'),
+    'access arguments' => array('administer tripal'),
     'type' => MENU_CALLBACK,
   );
   $items['admin/tripal/tripal_jobs/view/%'] = array(
@@ -246,14 +246,14 @@ function tripal_core_menu() {
     'description' => 'View job details.',
     'page callback' => 'tripal_jobs_view',
     'page arguments' => array(4),
-    'access arguments' => array('access administration pages'),
+    'access arguments' => array('administer tripal'),
     'type' => MENU_CALLBACK,
   );
   $items['admin/tripal/tripal_jobs/views/jobs/enable'] = array(
     'title' => 'Enable Jobs Administrative View',
     'page callback' => 'tripal_views_admin_enable_view',
     'page arguments' => array('tripal_core_admin_jobs', 'admin/tripal/tripal_jobs'),
-    'access arguments' => array('access administration pages'),
+    'access arguments' => array('administer tripal'),
     'type' => MENU_CALLBACK,
   );
 
@@ -262,7 +262,7 @@ function tripal_core_menu() {
     'title' => 'Materialized Views',
     'description' => 'Materialized views are used to improve speed of large or complex queries.',
     'page callback' => 'tripal_mview_admin_view',
-    'access arguments' => array('access administration pages'),
+    'access arguments' => array('administer tripal'),
     'type' => MENU_NORMAL_ITEM,
     'weight' => -10
   );
@@ -271,7 +271,7 @@ function tripal_core_menu() {
     'description' => 'Help for the materialized views management system',
     'page callback' => 'theme',
     'page arguments' => array('tripal_core_mviews_help'),
-    'access arguments' => array('access administration pages'),
+    'access arguments' => array('administer tripal'),
     'type' => MENU_LOCAL_TASK,
     'weight' => 10
   );
@@ -280,7 +280,7 @@ function tripal_core_menu() {
     'title' => 'List Materialized Views',
     'description' => 'A list of existing materialized views with the ability to edit & delete existing materialized views.',
     'page callback' => 'tripal_mviews_report',
-    'access arguments' => array('access administration pages'),
+    'access arguments' => array('administer tripal'),
     'type' => MENU_NORMAL_ITEM,
     'weight' => -10
   );
@@ -290,7 +290,7 @@ function tripal_core_menu() {
     'description' => 'Materialized views are used to improve speed of large or complex queries. These are database views as compared to Drupal views.',
     'page callback' => 'tripal_mview_report',
     'page arguments' => array(5),
-    'access arguments' => array('access administration pages'),
+    'access arguments' => array('administer tripal'),
     'type' => MENU_CALLBACK,
   );
   $items['admin/tripal/schema/mviews/new'] = array(
@@ -298,14 +298,14 @@ function tripal_core_menu() {
     'description' => 'Create a new materialized view.',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('tripal_mviews_form'),
-    'access arguments' => array('access administration pages'),
+    'access arguments' => array('administer tripal'),
     'type' => MENU_CALLBACK,
   );
   $items['admin/tripal/schema/mviews/edit/%'] = array(
     'title' => 'Edit Materialized View',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('tripal_mviews_form', 5),
-    'access arguments' => array('access administration pages'),
+    'access arguments' => array('administer tripal'),
     'type' => MENU_CALLBACK,
   );
   $items['admin/tripal/schema/mviews/action/%/%'] = array(
@@ -313,7 +313,7 @@ function tripal_core_menu() {
     'description' => 'Materialized views are used to improve speed of large or complex queries.',
     'page callback' => 'tripal_mviews_action',
     'page arguments' => array(5, 6, "1"),
-    'access arguments' => array('access administration pages'),
+    'access arguments' => array('administer tripal'),
     'type' => MENU_CALLBACK,
   );
 
@@ -322,7 +322,7 @@ function tripal_core_menu() {
     'title' => 'Custom Tables',
     'description' => 'Creation of custom tables that are added to Chado database.',
     'page callback' => 'tripal_custom_table_admin_view',
-    'access arguments' => array('access administration pages'),
+    'access arguments' => array('administer tripal'),
     'type' => MENU_NORMAL_ITEM,
     'weight' => -10
   );
@@ -331,7 +331,7 @@ function tripal_core_menu() {
     'description' => 'Help for the tripal job management system',
     'page callback' => 'theme',
     'page arguments' => array('tripal_core_job_help'),
-    'access arguments' => array('access administration pages'),
+    'access arguments' => array('administer tripal'),
     'type' => MENU_LOCAL_TASK,
     'weight' => 10
   );
@@ -340,7 +340,7 @@ function tripal_core_menu() {
     'title' => 'List of Custom Tables',
     'description' => 'Provides a list of all custom tables created by Tripal and allows for editing or removing existing custom tables.',
     'page callback' => 'tripal_custom_tables_list',
-    'access arguments' => array('access administration pages'),
+    'access arguments' => array('administer tripal'),
     'type' => MENU_NORMAL_ITEM,
     'weight' => -10
   );
@@ -350,21 +350,21 @@ function tripal_core_menu() {
     'description' => 'Custom tables are added to Chado.',
     'page callback' => 'tripal_custom_table_view',
     'page arguments' => array(4),
-    'access arguments' => array('access administration pages'),
+    'access arguments' => array('administer tripal'),
     'type' => MENU_CALLBACK,
   );
   $items['admin/tripal/schema/custom_tables/new'] = array(
     'title' => 'Create Custom Table',
     'description' => 'An interface for creating your own custom tables.',
     'page callback' => 'tripal_custom_table_new_page',
-    'access arguments' => array('access administration pages'),
+    'access arguments' => array('administer tripal'),
     'type' => MENU_CALLBACK,
   );
   $items['admin/tripal/schema/custom_tables/edit/%'] = array(
     'title' => 'Edit Custom Table',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('tripal_custom_tables_form', 4),
-    'access arguments' => array('access administration pages'),
+    'access arguments' => array('administer tripal'),
     'type' => MENU_CALLBACK,
   );
   $items['admin/tripal/schema/custom_tables/action/%/%'] = array(
@@ -372,14 +372,14 @@ function tripal_core_menu() {
     'description' => 'Custom tables are added to Chado.',
     'page callback' => 'tripal_custom_tables_action',
     'page arguments' => array(4, 5, "1"),
-    'access arguments' => array('access administration pages'),
+    'access arguments' => array('administer tripal'),
     'type' => MENU_CALLBACK,
   );
   $items['admin/tripal/schema/custom_tables/views/tables/enable'] = array(
     'title' => 'Enable Custom Tables Administrative View',
     'page callback' => 'tripal_views_admin_enable_view',
     'page arguments' => array('tripal_core_admin_custom_table', 'admin/tripal/schema/custom_tables'),
-    'access arguments' => array('access administration pages'),
+    'access arguments' => array('administer tripal'),
     'type' => MENU_CALLBACK,
   );
 
@@ -399,6 +399,10 @@ function tripal_core_permission() {
       'title' => t('Install Chado'),
       'description' => t('Allow the user to install or upgrade a Chado database in the existing Drupal database.')
     ),
+    'administer tripal' => array(
+      'title' => t('Administer Tripal'),
+      'description' => t('Allow the user to access administrative pages of Tripal.')
+    ),
   );
 }
 

+ 12 - 12
tripal_cv/tripal_cv.module

@@ -158,18 +158,6 @@ function tripal_cv_menu() {
     'access arguments' => array('administer controlled vocabularies'),
     'type' => MENU_CALLBACK,
   );
-
-  /*
-   * Charts
-   */
-  $items['tripal_cv_chart'] = array(
-    'path' => 'tripal_cv_chart',
-    'page callback' => 'tripal_cv_chart',
-    'page arguments' => array(1),
-    'access arguments' => array('access content'),
-    'type' => MENU_CALLBACK
-  );
-
   /*
    * Menu items for enabling views
    */
@@ -187,6 +175,18 @@ function tripal_cv_menu() {
     'access arguments' => array('administer controlled vocabularies'),
     'type' => MENU_CALLBACK,
   );
+  
+  /*
+   * Charts
+  */
+  $items['tripal_cv_chart'] = array(
+    'path' => 'tripal_cv_chart',
+    'page callback' => 'tripal_cv_chart',
+    'page arguments' => array(1),
+    'access arguments' => array('access content'),
+    'type' => MENU_CALLBACK
+  );
+  
 
   /*
    * Menu items for working with CV Trees

+ 2 - 2
tripal_db/tripal_db.module

@@ -74,14 +74,14 @@ function tripal_db_menu() {
     'title' => 'Enable Database Administrative View',
     'page callback' => 'tripal_views_admin_enable_view',
     'page arguments' => array('tripal_db_admin_dbs', 'admin/tripal/chado/tripal_db'),
-    'access arguments' => array('administer controlled vocabularies'),
+    'access arguments' => array('administer db cross-references'),
     'type' => MENU_CALLBACK,
   );
   $items['admin/tripal/chado/tripal_db/views/dbxrefs/enable'] = array(
     'title' => 'Enable Reference Administrative View',
     'page callback' => 'tripal_views_admin_enable_view',
     'page arguments' => array('tripal_db_admin_dbxrefs', 'admin/tripal/chado/tripal_db'),
-    'access arguments' => array('administer controlled vocabularies'),
+    'access arguments' => array('administer db cross-references'),
     'type' => MENU_CALLBACK,
   );
 

+ 14 - 14
tripal_feature/tripal_feature.module

@@ -128,12 +128,20 @@ function tripal_feature_menu() {
     'type' => MENU_CALLBACK,
   );
 
+  // the menu link for addressing any feature (by name, uniquename, synonym)
+  $items['feature/%'] = array(
+    'page callback' => 'tripal_feature_match_features_page',
+    'page arguments' => array(1),
+    'access arguments' => array('access chado_feature content'),
+    'type' => MENU_LOCAL_TASK,
+  );
+  
   // the administative settings menu
   $items['admin/tripal/chado/tripal_feature'] = array(
     'title' => 'Features',
     'description' => 'A biological sequence or a section of a biological sequence, or a collection of such sections.',
     'page callback' => 'tripal_feature_admin_feature_view',
-    'access arguments' => array('administer tripal features'),
+    'access arguments' => array('administer tripal feature'),
     'type' => MENU_NORMAL_ITEM,
   );
 
@@ -142,7 +150,7 @@ function tripal_feature_menu() {
     'description' => 'Delete multiple features from Chado',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('tripal_feature_delete_form'),
-    'access arguments' => array('administer tripal features'),
+    'access arguments' => array('administer tripal feature'),
     'type' => MENU_LOCAL_TASK,
     'weight' => 2
   );
@@ -160,7 +168,7 @@ function tripal_feature_menu() {
     'description' => 'Configure the Tripal Feature module.',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('tripal_feature_admin'),
-    'access arguments' => array('administer tripal features'),
+    'access arguments' => array('administer tripal feature'),
     'type' => MENU_LOCAL_TASK,
     'weight' => 5
   );
@@ -169,7 +177,7 @@ function tripal_feature_menu() {
     'description' => 'Help with the Tripal Feature module.',
     'page callback' => 'theme',
     'page arguments' => array('tripal_feature_help'),
-    'access arguments' => array('administer tripal features'),
+    'access arguments' => array('administer tripal feature'),
     'type' => MENU_LOCAL_TASK,
     'weight' =>  10
   );
@@ -181,7 +189,7 @@ function tripal_feature_menu() {
     'description' => 'Load sequences from a multi-FASTA file into Chado',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('tripal_feature_fasta_load_form'),
-    'access arguments' => array('administer tripal features'),
+    'access arguments' => array('administer tripal feature'),
     'type' => MENU_NORMAL_ITEM,
   );
   $items['admin/tripal/loaders/gff3_load'] = array(
@@ -189,18 +197,10 @@ function tripal_feature_menu() {
     'description' => 'Import a GFF3 file into Chado',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('tripal_feature_gff3_load_form'),
-    'access arguments' => array('administer tripal features'),
+    'access arguments' => array('administer tripal feature'),
     'type' => MENU_NORMAL_ITEM,
   );
 
-  // the menu link for addressing any feature (by name, uniquename, synonym)
-  $items['feature/%'] = array(
-    'page callback' => 'tripal_feature_match_features_page',
-    'page arguments' => array(1),
-    'access arguments' => array('access chado_feature content'),
-    'type' => MENU_LOCAL_TASK,
-  );
-
   // Enable admin view
   $items['admin/tripal/chado/tripal_feature/views/features/enable'] = array(
     'title' => 'Enable feature Administrative View',

+ 1 - 19
tripal_featuremap/tripal_featuremap.module

@@ -122,7 +122,7 @@ function tripal_featuremap_menu() {
     'description' => 'Sync featuremaps from Chado with Drupal',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('tripal_core_chado_node_sync_form', 'tripal_featuremap', 'chado_featuremap'),
-    'access arguments' => array('administer tripal featuremaps'),
+    'access arguments' => array('administer tripal featuremap'),
     'type' => MENU_LOCAL_TASK,
     'weight' => 0
   );
@@ -135,24 +135,6 @@ function tripal_featuremap_menu() {
     'type' => MENU_CALLBACK
   );
 
-  // AJAX calls for adding/removing properties to a featuremap
-  $items['tripal_featuremap/properties/add'] = array(
-    'page callback' => 'tripal_featuremap_property_add',
-    'access arguments' => array('edit chado_featuremap content'),
-    'type ' => MENU_CALLBACK,
-  );
-  $items['tripal_featuremap/properties/description'] = array(
-    'page callback' => 'tripal_featuremap_property_get_description',
-    'access arguments' => array('edit chado_featuremap content'),
-    'type ' => MENU_CALLBACK,
-  );
-  $items['tripal_featuremap/properties/minus/%/%'] = array(
-    'page callback' => 'tripal_featuremap_property_delete',
-    'page arguments' => array(3, 4),
-    'access arguments' => array('edit chado_featuremap content'),
-    'type ' => MENU_CALLBACK,
-  );
-
   $items['admin/tripal/chado/tripal_featuremap/views/featuremaps/enable'] = array(
     'title' => 'Enable featuremap Administrative View',
     'page callback' => 'tripal_views_admin_enable_view',

+ 14 - 0
tripal_genetic/tripal_genetic.module

@@ -13,6 +13,20 @@ require('theme/tripal_genetic.theme.inc');
 require('includes/tripal_genetic.schema.inc');
 require('includes/tripal_genetic.admin.inc');
 
+/**
+ *  Set the permission types that the chado module uses.  Essentially we
+ *  want permissionis 
+ *
+ * @ingroup tripal_genetic
+ */
+function tripal_genetic_permission() {
+  return array(
+    'adminster tripal genetic' => array(
+      'title' => t('Administer Genetic Module'),
+      'description' => t('Allow users to administer the genetic module.'),
+    ),
+  );
+}
 /**
  *  Menu items are automatically added for the new node types created
  *  by this module to the 'Create Content' Navigation menu item.  This function

+ 4 - 4
tripal_library/tripal_library.module

@@ -62,7 +62,7 @@ function tripal_library_menu() {
     'title' => 'Libraries',
     'description' => 'Any biological library. Examples of genomic libraries include BAC, cDNA, FOSMID, etc.',
     'page callback' => 'tripal_library_admin_libraries_listing',
-    'access arguments' => array('administer tripal libraries'),
+    'access arguments' => array('administer tripal library'),
     'type' => MENU_NORMAL_ITEM,
   );
 
@@ -71,7 +71,7 @@ function tripal_library_menu() {
     'description' => 'Basic Description of Tripal Library Module Functionality',
     'page callback' => 'theme',
     'page arguments' => array('tripal_library_help'),
-    'access arguments' => array('administer tripal libraries'),
+    'access arguments' => array('administer tripal library'),
     'type' => MENU_LOCAL_TASK,
     'weight' => 10
   );
@@ -81,7 +81,7 @@ function tripal_library_menu() {
     'description' => 'Configure the Tripal Library module',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('tripal_library_admin'),
-    'access arguments' => array('administer tripal libraries'),
+    'access arguments' => array('administer tripal library'),
     'type' => MENU_LOCAL_TASK,
     'weight' => 5
   );
@@ -99,7 +99,7 @@ function tripal_library_menu() {
     'title' => 'Enable Library Administrative View',
     'page callback' => 'tripal_views_admin_enable_view',
     'page arguments' => array('tripal_library_admin_libraries', 'admin/tripal/chado/tripal_library'),
-    'access arguments' => array('administer tripal libraries'),
+    'access arguments' => array('administer tripal library'),
     'type' => MENU_CALLBACK,
   );
 

+ 17 - 3
tripal_natural_diversity/tripal_natural_diversity.module

@@ -12,6 +12,20 @@ require_once('includes/tripal_natural_diversity.admin.inc');
  * @}
  */
 
+/**
+ *  Set the permission types that the chado module uses.  Essentially we
+ *  want permissionis
+ *
+ * @ingroup tripal_natural_diversity
+ */
+function tripal_natural_diversity_permission() {
+  return array(
+    'adminster tripal nd' => array(
+      'title' => t('Administer Natural Diversity Module'),
+      'description' => t('Allow users to administer the natural diversity module.'),
+    ),
+  );
+}
 /**
  *  Menu items are automatically added for the new node types created
  *  by this module to the 'Create Content' Navigation menu item.  This function
@@ -27,7 +41,7 @@ function tripal_natural_diversity_menu() {
    'title' => 'Natural Diversity Experiments',
    'description' => 'Experiments relating to natural diversity such as genotype and phenotype experiments.',
    'page callback' => 'tripal_natural_diversity_admin_natdiv_view',
-   'access arguments' => array('adminster tripal natural_diversity'),
+   'access arguments' => array('adminster tripal nd'),
    'type' => MENU_NORMAL_ITEM,
   );
 
@@ -36,7 +50,7 @@ function tripal_natural_diversity_menu() {
     'description' => ('Help for the Tripal natural diversity module.'),
     'page callback' => 'theme',
     'page arguments' => array('tripal_natural_diversity_help'),
-    'access arguments' => array('administer tripal natual_diversity'),
+    'access arguments' => array('administer tripal nd'),
     'type' => MENU_LOCAL_TASK,
     'weight' => 10
   );
@@ -45,7 +59,7 @@ function tripal_natural_diversity_menu() {
     'title' => 'Enable Natural Diversity Administrative View',
     'page callback' => 'tripal_views_admin_enable_view',
     'page arguments' => array('tripal_natural_diversity_admin_natdiv_exp', 'admin/tripal/chado/tripal_natdiv'),
-    'access arguments' => array('administer tripal natural_diversity'),
+    'access arguments' => array('administer tripal nd'),
     'type' => MENU_CALLBACK,
   );
 

+ 15 - 0
tripal_phenotype/tripal_phenotype.module

@@ -8,6 +8,21 @@
  * @}
  */
 
+/**
+ *  Set the permission types that the chado module uses.  Essentially we
+ *  want permissionis
+ *
+ * @ingroup tripal_phenotype
+ */
+function tripal_phenotype_permission() {
+  return array(
+    'adminster tripal phenotype' => array(
+      'title' => t('Administer Phenotype Module'),
+      'description' => t('Allow users to administer the phenotype module.'),
+    ),
+  );
+}
+
 /**
  *  Menu items are automatically added for the new node types created
  *  by this module to the 'Create Content' Navigation menu item.  This function

+ 5 - 5
tripal_project/tripal_project.module

@@ -38,7 +38,7 @@ function tripal_project_menu() {
     'title' => 'Projects',
     'description' => ('A project. Can be used for grouping data such as with the natural diversity module data.'),
     'page callback' => 'tripal_project_admin_project_view',
-    'access arguments' => array('adminster tripal projects'),
+    'access arguments' => array('adminster tripal project'),
     'type' => MENU_NORMAL_ITEM
   );
 
@@ -47,7 +47,7 @@ function tripal_project_menu() {
     'description' => ("Basic Description of Tripal Project Module Functionality."),
     'page callback' => 'theme',
     'page arguments' => array('tripal_project_help'),
-    'access arguments' => array('adminster tripal projects'),
+    'access arguments' => array('adminster tripal project'),
     'type' => MENU_LOCAL_TASK,
     'weight' => 6
   );
@@ -56,7 +56,7 @@ function tripal_project_menu() {
     'title' => 'Settings',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('tripal_project_admin'),
-    'access arguments' => array('adminster tripal projects'),
+    'access arguments' => array('adminster tripal project'),
     'type' => MENU_LOCAL_TASK,
     'weight' => 4
   );
@@ -66,7 +66,7 @@ function tripal_project_menu() {
     'description' => 'Create pages on this site for projects stored in Chado',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('tripal_core_chado_node_sync_form', 'tripal_project', 'chado_project'),
-    'access arguments' => array('administer tripal projects'),
+    'access arguments' => array('administer tripal project'),
     'type' => MENU_LOCAL_TASK,
     'weight' => 0
   );
@@ -75,7 +75,7 @@ function tripal_project_menu() {
     'title' => 'Enable Project Administrative View',
     'page callback' => 'tripal_views_admin_enable_view',
     'page arguments' => array('tripal_project_admin_projects', 'admin/tripal/chado/tripal_project'),
-    'access arguments' => array('administer tripal projects'),
+    'access arguments' => array('administer tripal project'),
     'type' => MENU_CALLBACK,
   );
 

+ 12 - 29
tripal_pub/tripal_pub.module

@@ -64,7 +64,7 @@ function tripal_pub_menu() {
     'title' => 'Publications',
     'description' => ('A documented provenance artefact - publications, documents, personal communication.'),
     'page callback' => 'tripal_pub_admin_pub_view',
-    'access arguments' => array('administer tripal pubs'),
+    'access arguments' => array('administer tripal pub'),
     'type' => MENU_NORMAL_ITEM
   );
 
@@ -73,7 +73,7 @@ function tripal_pub_menu() {
     'description' => ('A module for interfacing the GMOD chado database with Drupal, providing viewing of publications'),
     'page callback' => 'theme',
     'page arguments' => array('tripal_pub_help'),
-    'access arguments' => array('administer tripal pubs'),
+    'access arguments' => array('administer tripal pub'),
     'type' => MENU_LOCAL_TASK,
     'weight' => 10
   );
@@ -83,7 +83,7 @@ function tripal_pub_menu() {
     'description' => 'Configure the Tripal publication module.',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('tripal_pub_admin'),
-    'access arguments' => array('administer tripal pubs'),
+    'access arguments' => array('administer tripal pub'),
     'type' => MENU_LOCAL_TASK,
     'weight' => 5
   );
@@ -104,7 +104,7 @@ function tripal_pub_menu() {
     'description' => 'Update publication citations',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('tripal_pub_citation_form'),
-    'access arguments' => array('administer tripal pubs'),
+    'access arguments' => array('administer tripal pub'),
     'type' => MENU_LOCAL_TASK,
     'weight' => 1
   );
@@ -113,7 +113,7 @@ function tripal_pub_menu() {
     'title' => t('Importers'),
     'description' => t('List all publication importers'),
     'page callback' => 'tripal_pub_importers_list',
-    'access arguments' => array('administer tripal pubs'),
+    'access arguments' => array('administer tripal pub'),
     'type' => MENU_LOCAL_TASK,
     'weight' => 0
   );
@@ -131,65 +131,48 @@ function tripal_pub_menu() {
     'title' => t('Add an Importer'),
     'description' => t('Add a new publication importer.'),
     'page callback' => 'tripal_pub_importer_setup_page',
-    'access arguments' => array('administer tripal pubs'),
+    'access arguments' => array('administer tripal pub'),
     'type ' => MENU_CALLBACK,
   );
 
   $items['admin/tripal/chado/tripal_pub/import/raw/%'] = array(
     'page callback' => 'tripal_pub_get_raw_data',
     'page arguments' => array(6),
-    'access arguments' => array('administer tripal pubs'),
+    'access arguments' => array('administer tripal pub'),
     'type ' => MENU_CALLBACK,
   );
 
   $items['admin/tripal/chado/tripal_pub/import/edit/%'] = array(
     'page callback' => 'tripal_pub_importer_setup_page',
     'page arguments' => array(5, 6),
-    'access arguments' => array('administer tripal pubs'),
+    'access arguments' => array('administer tripal pub'),
     'type ' => MENU_CALLBACK,
   );
 
   $items['admin/tripal/chado/tripal_pub/import/submit/%'] = array(
     'page callback' => 'tripal_pub_importer_submit_job',
     'page arguments' => array(6),
-    'access arguments' => array('administer tripal pubs'),
+    'access arguments' => array('administer tripal pub'),
     'type ' => MENU_CALLBACK,
   );
 
   $items['admin/tripal/chado/tripal_pub/import/delete/%'] = array(
     'page callback' => 'tripal_pub_importer_delete',
     'page arguments' => array(5),
-    'access arguments' => array('administer tripal pubs'),
+    'access arguments' => array('administer tripal pub'),
     'type ' => MENU_CALLBACK,
   );
   $items['admin/tripal/chado/tripal_pub/import/changedb'] = array(
     'page callback' => 'tripal_pub_importer_setup_page_update_remotedb',
     'page arguments' => array(),
-    'access arguments' => array('administer tripal pubs'),
+    'access arguments' => array('administer tripal pub'),
     'type ' => MENU_CALLBACK,
   );
 
   $items['admin/tripal/chado/tripal_pub/import/criteria/%/%'] = array(
     'page callback' => 'tripal_pub_importer_setup_page_update_criteria',
     'page arguments' => array(5, 6),
-    'access arguments' => array('administer tripal pubs'),
-    'type ' => MENU_CALLBACK,
-  );
-
-  $items['tripal_pub/chado/properties/add'] = array(
-    'page callback' => 'tripal_pub_property_add',
-    'access arguments' => array('edit chado_pub content'),
-    'type ' => MENU_CALLBACK,
-  );
-  $items['tripal_pub/chado/properties/description'] = array(
-    'page callback' => 'tripal_pub_property_get_description',
-    'access arguments' => array('edit chado_pub content'),
-    'type ' => MENU_CALLBACK,
-  );
-  $items['tripal_pub/chado/properties/minus/%/%'] = array(
-    'page callback' => 'tripal_pub_property_delete',
-    'page arguments' => array(3, 4),
-    'access arguments' => array('edit chado_pub content'),
+    'access arguments' => array('administer tripal pub'),
     'type ' => MENU_CALLBACK,
   );
 

+ 13 - 11
tripal_stock/tripal_stock.module

@@ -39,12 +39,20 @@ require_once("api/tripal_stock.api.inc");
 function tripal_stock_menu() {
   $items = array();
 
+  // the menu link for addressing any stock (by name, uniquename, synonym)
+  $items['stock/%'] = array(
+    'page callback' => 'tripal_stock_match_stocks_page',
+    'page arguments' => array(1),
+    'access arguments' => array('access chado_stock content'),
+    'type' => MENU_LOCAL_TASK,
+  );
+  
   //Administrative settings menu-----------------
   $items['admin/tripal/chado/tripal_stock'] = array(
     'title' => 'Stocks',
     'description' => 'A stock is the physical entities of an organism, either living or preserved.',
     'page callback' => 'tripal_stock_admin_stock_view',
-    'access arguments' => array('administer tripal stocks'),
+    'access arguments' => array('administer tripal stock'),
     'type' => MENU_NORMAL_ITEM
   );
 
@@ -53,7 +61,7 @@ function tripal_stock_menu() {
     'description' => 'Settings for Chado Stocks',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('tripal_stock_admin'),
-    'access arguments' => array('administer tripal stocks'),
+    'access arguments' => array('administer tripal stock'),
     'type' => MENU_LOCAL_TASK,
     'weight' => 5
   );
@@ -64,7 +72,7 @@ function tripal_stock_menu() {
     'page callback' => 'drupal_get_form',
     //'page arguments' => array('tripal_stock_sync_form'),
     'page arguments' => array('tripal_core_chado_node_sync_form', 'tripal_stock', 'chado_stock'),
-    'access arguments' => array('administer tripal stocks'),
+    'access arguments' => array('administer tripal stock'),
     'type' => MENU_LOCAL_TASK,
     'weight' => 0
   );
@@ -74,18 +82,12 @@ function tripal_stock_menu() {
     'description' => 'Basic Description of Tripal Stock Module Functionality',
     'page callback' => 'theme',
     'page arguments' => array('tripal_stock_help'),
-    'access arguments' => array('administer tripal stocks'),
+    'access arguments' => array('administer tripal stock'),
     'type' => MENU_LOCAL_TASK,
     'weight' => 10
   );
 
-  // the menu link for addressing any stock (by name, uniquename, synonym)
-  $items['stock/%'] = array(
-    'page callback' => 'tripal_stock_match_stocks_page',
-    'page arguments' => array(1),
-    'access arguments' => array('access chado_stock content'),
-    'type' => MENU_LOCAL_TASK,
-  );
+
   return $items;
 }