There is a typo in the hook_permissions() implementation as it contains two underscores and it is not picked up by Drupal.

/**
 * Implements hook_permission().
 */
function rest_api_doc__permission() {
  return array(
    'access rest_api_doc' => array(
      'title' => t('Access REST API documentation'),
      'description' => t('Allow to the user to access the REST API documentation.'),
    ),
    'administer rest_api_doc' => array(
      'title' => t('Administer REST API documentation'),
      'description' => t('Allow to the user to administer the REST API documentation.'),
    ),
  );
}

Comments

kurkuma’s picture

Title: Typo in hook_permissions() » Typo in hook_permission()
kurkuma’s picture

Status: Active » Needs review
StatusFileSize
new415 bytes
larowlan’s picture

How do the tests pass in HEAD?

larowlan’s picture

Status: Needs review » Needs work
Issue tags: +Needs tests

Oh, this is the 7.x branch - there are no tests.
Can we get a test demonstrating the fail @djdevin?

djdevin’s picture

Assigned: Unassigned » djdevin
djdevin’s picture

Status: Needs work » Needs review
StatusFileSize
new1.47 KB
new1.88 KB

The last submitted patch, 6: typo_in_hook_permission-2492213-6-TEST.patch, failed testing.

  • djdevin committed 77b7fce on 7.x-1.x authored by kurkuma
    Issue #2492213 by djdevin, kurkuma: Typo in hook_permission()
    
djdevin’s picture

Status: Needs review » Fixed

Thanks, fixed!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.