开发者

How to combine standard content type with customized hook_access()?

I am happy with the standard Page and Story content types.

Still I need more control ov开发者_如何学Goer the access control.

I would like to write my own access control.

I like the concept of the hook_access() for controlling access to the content types you build your self.

Do I have a hook_access() available when I am using my content type?


The content access module allows you to set access control on a per content type, or even per node basis.


I would like to write my own access control.

Simon is right, the content_access module is probably what you're looking for. Don't reinvent the wheel if you don't have to.

I like the concept of the hook_access() for controlling access to the content types you build your self.

This is the preferred "drupal way"

Do I have a hook_access() available when I am using my content type?

hook_access is available to all content types since all content types are stored in the form of a node. hook_access is called whenever any one the defined (nodeapi) operations are called.


"hook_access is available to all content types since all content types are stored in the form of a node." this is exactly what I want, but it seems that hook_access works just for content types that are created by a module, not for content types which are created in the standard form (using GUI). I know that I don't speak English so good, do you get what I said?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜