function tripal_example_permission

2.x tripal_example.module tripal_example_permission()

Implementation of hook_permissions()

Set the permission types that this module uses.

File

tripal_example/tripal_example.module, line 27
This file contains all Drupal hooks for the module other than any node hooks and block hooks. Those go in the [module name].chado_node.inc file and [module_name].blocks.inc respectively

Code

function tripal_example_permission() {

  // EXPLANATION:  here we want to setup any of the permission types that this
  // module needs. Our example module creates a new chado node type called
  // 'chado_example'. Therefore, we need permissions to view, edit, delete,
  // create our new node type. Additionally, we want to add a permission that
  // allows for administration of this module. These permissions will appear in
  // the 'People' -> 'Permissions' configuration page and allow the site admin
  // to specify which user roles are allowed to perform specific actions.
  return array(
    'access chado_example content' => array(
      'title' => t('View Examples'),
      'description' => t('Allow users to view example pages.'),
    ),
    'create chado_example content' => array(
      'title' => t('Create Examples'),
      'description' => t('Allow users to create new example pages.'),
    ),
    'delete chado_example content' => array(
      'title' => t('Delete Examples'),
      'description' => t('Allow users to delete example pages.'),
    ),
    'edit chado_example content' => array(
      'title' => t('Edit Examples'),
      'description' => t('Allow users to edit example pages.'),
    ),
    'administer tripal example' => array(
      'title' => t('Administer Examples'),
      'description' => t('Allow users to administer all examples.'),
    ),
  );
}