开发者

Programmatically add user forum permissions in Drupal

开发者 https://www.devze.com 2023-01-21 15:33 出处:网络
I\'d like to programmatically add user forum permissions in Drupal. Do I have to use ACL module? Is there any 开发者_如何转开发example out there, as the documentation is a bit thin?The Rules module w

I'd like to programmatically add user forum permissions in Drupal.

Do I have to use ACL module? Is there any 开发者_如何转开发example out there, as the documentation is a bit thin?


The Rules module will work as well. With the rules module (but not with ACL) you have the option of setting triggers for this to occur.


What do you mean by programmatically, exactly?

You can define new permissions using hook_perm:

http://api.drupal.org/api/function/hook_perm

But the forum module(s) for Drupal should ship with role based permissions to use.

0

精彩评论

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

关注公众号