|
@@ -46,7 +46,7 @@ function tripal_cv_menu() {
|
|
'description' => 'Basic Description of Tripal CV Module Functionality',
|
|
'description' => 'Basic Description of Tripal CV Module Functionality',
|
|
'page callback' => 'tripal_cv_module_description_page',
|
|
'page callback' => 'tripal_cv_module_description_page',
|
|
'page arguments' => array(''),
|
|
'page arguments' => array(''),
|
|
- 'access arguments' => array('administer site configuration'),
|
|
|
|
|
|
+ 'access arguments' => array('administer controlled vocabularies'),
|
|
'type' => MENU_NORMAL_ITEM,
|
|
'type' => MENU_NORMAL_ITEM,
|
|
);
|
|
);
|
|
|
|
|
|
@@ -54,7 +54,7 @@ function tripal_cv_menu() {
|
|
'title' => 'Load Ontology',
|
|
'title' => 'Load Ontology',
|
|
'page callback' => 'drupal_get_form',
|
|
'page callback' => 'drupal_get_form',
|
|
'page arguments' => array('tripal_cv_obo_form'),
|
|
'page arguments' => array('tripal_cv_obo_form'),
|
|
- 'access arguments' => array('administer site configuration'),
|
|
|
|
|
|
+ 'access arguments' => array('administer controlled vocabularies'),
|
|
'type' => MENU_NORMAL_ITEM,
|
|
'type' => MENU_NORMAL_ITEM,
|
|
);
|
|
);
|
|
|
|
|
|
@@ -63,7 +63,7 @@ function tripal_cv_menu() {
|
|
'description' => 'The Chado cvtermpath table provides lineage for terms and is useful for quickly finding any ancestor parent of a term. However, this table must be populated. This page allows for populating of this table one vocabulary at a time',
|
|
'description' => 'The Chado cvtermpath table provides lineage for terms and is useful for quickly finding any ancestor parent of a term. However, this table must be populated. This page allows for populating of this table one vocabulary at a time',
|
|
'page callback' => 'drupal_get_form',
|
|
'page callback' => 'drupal_get_form',
|
|
'page arguments' => array('tripal_cv_cvtermpath_form'),
|
|
'page arguments' => array('tripal_cv_cvtermpath_form'),
|
|
- 'access arguments' => array('administer site configuration'),
|
|
|
|
|
|
+ 'access arguments' => array('administer controlled vocabularies'),
|
|
'type' => MENU_NORMAL_ITEM,
|
|
'type' => MENU_NORMAL_ITEM,
|
|
);
|
|
);
|
|
|
|
|
|
@@ -74,7 +74,7 @@ function tripal_cv_menu() {
|
|
'title' => 'Add a Vocabulary',
|
|
'title' => 'Add a Vocabulary',
|
|
'page callback' => 'drupal_get_form',
|
|
'page callback' => 'drupal_get_form',
|
|
'page arguments' => array('tripal_cv_add_form'),
|
|
'page arguments' => array('tripal_cv_add_form'),
|
|
- 'access arguments' => array('administer site configuration'),
|
|
|
|
|
|
+ 'access arguments' => array('administer controlled vocabularies'),
|
|
'type' => MENU_NORMAL_ITEM,
|
|
'type' => MENU_NORMAL_ITEM,
|
|
);
|
|
);
|
|
|
|
|
|
@@ -82,13 +82,13 @@ function tripal_cv_menu() {
|
|
'title' => 'Edit a Vocabulary',
|
|
'title' => 'Edit a Vocabulary',
|
|
'description' => 'Edit a controlled vocabularies/ontolgoies in Chado ',
|
|
'description' => 'Edit a controlled vocabularies/ontolgoies in Chado ',
|
|
'page callback' => 'tripal_cv_edit_page',
|
|
'page callback' => 'tripal_cv_edit_page',
|
|
- 'access arguments' => array('administer site configuration'),
|
|
|
|
|
|
+ 'access arguments' => array('administer controlled vocabularies'),
|
|
'type' => MENU_NORMAL_ITEM,
|
|
'type' => MENU_NORMAL_ITEM,
|
|
);
|
|
);
|
|
|
|
|
|
$items['admin/tripal/tripal_cv/cv/edit/js'] = array(
|
|
$items['admin/tripal/tripal_cv/cv/edit/js'] = array(
|
|
'page callback' => 'tripal_ajax_cv_edit',
|
|
'page callback' => 'tripal_ajax_cv_edit',
|
|
- 'access arguments' => array('administer site configuration'),
|
|
|
|
|
|
+ 'access arguments' => array('administer controlled vocabularies'),
|
|
'type' => MENU_CALLBACK,
|
|
'type' => MENU_CALLBACK,
|
|
);
|
|
);
|
|
|
|
|
|
@@ -100,19 +100,19 @@ function tripal_cv_menu() {
|
|
'description' => 'Manage controlled vocabulary/ontology terms in Chado ',
|
|
'description' => 'Manage controlled vocabulary/ontology terms in Chado ',
|
|
'page callback' => 'drupal_get_form',
|
|
'page callback' => 'drupal_get_form',
|
|
'page arguments' => array('tripal_cv_cvterm_form', 'add'),
|
|
'page arguments' => array('tripal_cv_cvterm_form', 'add'),
|
|
- 'access arguments' => array('administer site configuration'),
|
|
|
|
|
|
+ 'access arguments' => array('administer controlled vocabularies'),
|
|
'type' => MENU_NORMAL_ITEM,
|
|
'type' => MENU_NORMAL_ITEM,
|
|
);
|
|
);
|
|
|
|
|
|
$items['admin/tripal/tripal_cv/cvterm/ahah'] = array(
|
|
$items['admin/tripal/tripal_cv/cvterm/ahah'] = array(
|
|
'page callback' => 'tripal_cv_cvterm_callback',
|
|
'page callback' => 'tripal_cv_cvterm_callback',
|
|
- 'access arguments' => array('administer site configuration'),
|
|
|
|
|
|
+ 'access arguments' => array('administer controlled vocabularies'),
|
|
'type' => MENU_CALLBACK,
|
|
'type' => MENU_CALLBACK,
|
|
);
|
|
);
|
|
$items['admin/tripal/tripal_cv/cvterm/auto_name/%/%'] = array(
|
|
$items['admin/tripal/tripal_cv/cvterm/auto_name/%/%'] = array(
|
|
'page callback' => 'tripal_cv_cvterm_name_autocomplete',
|
|
'page callback' => 'tripal_cv_cvterm_name_autocomplete',
|
|
'page arguments' => array(5, 6),
|
|
'page arguments' => array(5, 6),
|
|
- 'access arguments' => array('administer site configuration'),
|
|
|
|
|
|
+ 'access arguments' => array('administer controlled vocabularies'),
|
|
'type' => MENU_CALLBACK,
|
|
'type' => MENU_CALLBACK,
|
|
);
|
|
);
|
|
|
|
|
|
@@ -121,10 +121,10 @@ function tripal_cv_menu() {
|
|
'description' => 'Edit an existing controlled vocabulary/ontology terms in Chado ',
|
|
'description' => 'Edit an existing controlled vocabulary/ontology terms in Chado ',
|
|
'page callback' => 'drupal_get_form',
|
|
'page callback' => 'drupal_get_form',
|
|
'page arguments' => array('tripal_cv_cvterm_form', 'edit'),
|
|
'page arguments' => array('tripal_cv_cvterm_form', 'edit'),
|
|
- 'access arguments' => array('administer site configuration'),
|
|
|
|
|
|
+ 'access arguments' => array('administer controlled vocabularies'),
|
|
'type' => MENU_NORMAL_ITEM,
|
|
'type' => MENU_NORMAL_ITEM,
|
|
);
|
|
);
|
|
-
|
|
|
|
|
|
+
|
|
/*
|
|
/*
|
|
* Charts
|
|
* Charts
|
|
*/
|
|
*/
|
|
@@ -142,7 +142,7 @@ function tripal_cv_menu() {
|
|
*/
|
|
*/
|
|
$items['cv_browser'] = array(
|
|
$items['cv_browser'] = array(
|
|
'page callback' => 'tripal_cv_show_browser',
|
|
'page callback' => 'tripal_cv_show_browser',
|
|
- 'access arguments' => array('access chado_cv content'),
|
|
|
|
|
|
+ 'access arguments' => array('access content'),
|
|
'type' => MENU_CALLBACK
|
|
'type' => MENU_CALLBACK
|
|
);
|
|
);
|
|
|
|
|
|
@@ -181,49 +181,9 @@ function tripal_cv_menu() {
|
|
'type' => MENU_CALLBACK
|
|
'type' => MENU_CALLBACK
|
|
);
|
|
);
|
|
|
|
|
|
- $items['tripal_cv_cvterm_edit'] = array(
|
|
|
|
- 'path' => 'tripal_cv_edit',
|
|
|
|
- 'title' => 'CV Term Editor',
|
|
|
|
- 'page callback' => 'tripal_cv_cvterm_edit',
|
|
|
|
- 'page arguments' => array(1),
|
|
|
|
- 'access arguments' => array('edit chado_cv content'),
|
|
|
|
- 'type' => MENU_CALLBACK
|
|
|
|
- );
|
|
|
|
-
|
|
|
|
return $items;
|
|
return $items;
|
|
}
|
|
}
|
|
|
|
|
|
-/**
|
|
|
|
- * The following function proves access control for users trying to
|
|
|
|
- * perform actions on data managed by this module
|
|
|
|
- *
|
|
|
|
- * @ingroup tripal_cv
|
|
|
|
- */
|
|
|
|
-function chado_cv_access($op, $node, $account) {
|
|
|
|
- if ($op == 'create') {
|
|
|
|
- if (!user_access('create chado_cv content', $account)) {
|
|
|
|
- return FALSE;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- if ($op == 'update') {
|
|
|
|
- if (!user_access('edit chado_cv content', $account)) {
|
|
|
|
- return FALSE;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- if ($op == 'delete') {
|
|
|
|
- if (!user_access('delete chado_cv content', $account)) {
|
|
|
|
- return FALSE;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- if ($op == 'view') {
|
|
|
|
- if (!user_access('access chado_cv content', $account)) {
|
|
|
|
- return FALSE;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- return NULL;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* Set the permission types that the chado module uses. Essentially we
|
|
* Set the permission types that the chado module uses. Essentially we
|
|
* want permissionis that protect creation, editing and deleting of chado
|
|
* want permissionis that protect creation, editing and deleting of chado
|
|
@@ -233,10 +193,7 @@ function chado_cv_access($op, $node, $account) {
|
|
*/
|
|
*/
|
|
function tripal_cv_perm() {
|
|
function tripal_cv_perm() {
|
|
return array(
|
|
return array(
|
|
- 'access chado_cv content',
|
|
|
|
- 'create chado_cv content',
|
|
|
|
- 'delete chado_cv content',
|
|
|
|
- 'edit chado_cv content',
|
|
|
|
|
|
+ 'administer controlled vocabularies',
|
|
);
|
|
);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -252,21 +209,6 @@ function tripal_cv_views_api() {
|
|
return array('api' => 2.0);
|
|
return array('api' => 2.0);
|
|
}
|
|
}
|
|
|
|
|
|
-/**
|
|
|
|
- * We need to let drupal know about our theme functions and their arguments.
|
|
|
|
- * We create theme functions to allow users of the module to customize the
|
|
|
|
- * look and feel of the output generated in this module
|
|
|
|
- *
|
|
|
|
- * @ingroup tripal_cv
|
|
|
|
- */
|
|
|
|
-function tripal_cv_theme() {
|
|
|
|
- return array(
|
|
|
|
- 'tripal_cv_cvterm_edit' => array(
|
|
|
|
- 'arguments' => array('cvterm'),
|
|
|
|
- ),
|
|
|
|
- );
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* Implements hook_coder_ignore().
|
|
* Implements hook_coder_ignore().
|
|
* Defines the path to the file (tripal_cv.coder_ignores.txt) where ignore rules for coder are stored
|
|
* Defines the path to the file (tripal_cv.coder_ignores.txt) where ignore rules for coder are stored
|