Drupal 6.x
I have this module that manages four different content types. For that matter, how do I define permission for each content within the same module? Is that even possible? I can't figure out how to define permission for each content type cuz hook_perm has to be named with module name and it doesn't have any argument(like hook_access $node) to return permission base on content type. Here's how I'd like to do -
function mymodule_perm()
{
if(content1)
return array(
'create content1 node',
'edit content1 nodes',
'delete content1 nodes',
);
if(content2)
return array(
'create content2 node',
'edit content2 nodes',
'delete content2 nodes',
);
if(content3)
return array(
'create content3 node',
'edit content3 nodes',
'delete content3 nodes',
);
.......
}
Any help would be highly appreciated.