基于相关节点字段的 Drupal (+CCK) 权限
假设我有两种内容类型,“职位列表”和“职位申请”。职位申请有一个字段(使用 CCK 模块)来引用职位列表(必填字段)。假设职位申请有一个“状态”字段,其值为“新”、“已接受”、“已拒绝”等。
我想设置权限,以便职位申请状态只能由其对应的职位列表的创建者设置。如果有一个插件可以做到这一点就好了。我还想了解自定义插件如何实现这一点的总体指导。
(我正在遵循 O'Reilly 的“Using Drupal”第 3 章中的场景)
Suppose I have two content typs, "Job Listing" and "Job Application". A job application has a field (using the CCK module) to reference the job listing (a required field). Suppose the job application has a field "Status" with values like "new", "accepted", "rejected".
I would like to set permissions so that the job application status can only be set by the creator of the job listing it corresponds to. If there is an addon that can do this great. I would also like general direction as to how a custom addon might implement this.
(I am following the scenario in Ch. 3 of O'Reilly's "Using Drupal")
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不知道是否有一个模块可以实现此目的,但这可以通过一些自定义代码轻松完成。
hook_form_alter
添加您自己的验证处理程序应用程序内容类型的node_edit 表单。I don't know if there is a module for this but this can be done pretty easily with some custom code though.
hook_form_alter
to add your own validate handler to the node_edit form for the application content type.googletorp 的指示是在正确的轨道上,但您还必须注意更多的权限。
Directions by googletorp are on the right track but you will have to take care of some more permissions also.