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:
- Used Content Access Control module to set the access permission to a particular role to which the user belongs.
- Set up a custom resource type for the services module to send the content list in JSON format.
- Implemented oauth to authorize the request.
- 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.
EDIT:
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.