I have a requirement to return a list of content types accessible to a user in JSON format using services module.

I have followed this approach:

  1. Used Content Access Control module to set the access permission to a particular role to which the user belongs.
  2. Set up a custom resource type for the services module to send the content list in JSON format.
  3. Implemented oauth to authorize the request.
  4. I could send all the content types present in the drupal setup using my custom resource for services module.

Now I want to check the permissions as declared by the Content access module for a role to access the content types.

I am a beginner with drupal and php programming. I am just trying to ready a module which communicates with my android client. Any help would be greatly appreciated.


I followed RajeevK's advice to get the list of permissions from the role_permission table (actually I accessed this using phpmyadmin inerface).

But the permissions declared by the content_access module such as view any <content-type> content are not listed in the role_access.

Since I have accepted the answer here, I will spawn a new thread and rephrase this question.

1 Answer 1


Good. I hope you are using D7.

So lets start with the finding the machine name of the permission which get saved with the user_role when you enable the permission for particular user type.

These are them -

administer services, get any binary files, get own binary files, save file information, get a system variable, set a system variable, perform unlimited index queries.

Get you RID from the table ROLE by searching your NAME.ROLE


List anywhere and do what you want...

Enjoy :)

  • Suggestions from @RajeevK helped me to get the list of permissions, I am working on the module will report back asap.
    – Supreethks
    Jan 23, 2013 at 12:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.