drupal-permissions

Hook perm for more than one content type

青春壹個敷衍的年華 提交于 2019-12-13 02:21:10
问题 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

How do I give a specific user editing rights to a specific node?

半世苍凉 提交于 2019-12-04 09:32:21
问题 How do I give a specific user editing rights to a specific node? I have a user role named "Student". Multiple users have that role, only a few of them can edit a node. How can I realise this? 回答1: I'll try and cover a few use cases, with how I would solve them: If all members of a category of users can edit any node of a certain type Create a new role for that subset of users ('Super Students', as Emyr suggested) and grant them 'Edit content of type' permissions through Drupal's core