The hook *hook_permission* does not provides all the permissions needed for the resources, so they are not available on the *Permissions* page. For example, the *view client* which is needed to view a client using the *hosting_client* endpoint.

  $resources['hosting_client'] = array(
....
    'retrieve' => array(
      'callback' => 'hosting_get_client',
      'help' => t('Fetch the client node.'),
      'access arguments' => array('view client'),
      'args' => array(
        array(
          'name' => 'nid',
          'type' => 'string',
          'optional' => FALSE,
          'description' => t('Nid or unique name of the client'),
          'source' => array('path' => '0')
        ),  
      ),  
    ),  
....
);

Comments

tucho created an issue. See original summary.

tucho’s picture

Status: Active » Needs review
StatusFileSize
new938 bytes

I uploaded a patch that adds the 4 missing permissions that I have detected.

I tested it with Drupal 7.56 and hosting_services 7.x-3.x.

tucho’s picture

Issue summary: View changes
StatusFileSize
new561 bytes
new530 bytes

Sorry!

I included two permissions created by the *node* module.

Just the *create client* and *view client* are missing.

I uploaded a new patch and an interdiff.

  • colan committed 44edec6 on 7.x-3.x authored by tucho
    Issue #2940099 by tucho: Added resource permissions for creating and...
colan’s picture

Status: Needs review » Fixed

Thanks!

Status: Fixed » Closed (fixed)

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