开发者

Extending permissions in Drupal

开发者 https://www.devze.com 2023-02-05 17:45 出处:网络
suppose i have a drupal module called question/answer that is a user post(question) that is later modified by a moderat开发者_如何转开发or(answer). i also have several categories under which questions

suppose i have a drupal module called question/answer that is a user post(question) that is later modified by a moderat开发者_如何转开发or(answer). i also have several categories under which questions are created. now a moderator can edit ANY question but i want to assign a separate moderator for each category so that he can't edit the questions of other categories.

is it possible to do?

thanks


There are several ways to approach this.

Using Taxonomy Access or the TAC Lite module

Where each category is it's own taxonomy term and separations are created by those vocabularies

Using Organic Groups

You can have a group for each category. Then you can use og_user_roles to create group roles within that group. Each group role can have specific abilities.

Custom module

If you are using Drupal 6, you can use hook_access to create those delineations. I would use taxonomy to create the categories. You will need to create an interface to assign roles to different taxonomies - basically what TAC Lite does.


You could use Taxonomy access control to handle the permissions, by using taxonomy to determine the catagory.

0

精彩评论

暂无评论...
验证码 换一张
取 消