开发者

Drupal: Comments to users from admin/manager

I am looking for a way in drupal for users to get comments from the administrator/manager. I would like a block that each of the users 开发者_如何学Gosees with personal comments from the manager to that user. Only managers can make comments and only the user the comment is intended for can read the comment. Is there a module or an easy way to do this? Any ideas would be great. Thanks


You can break the problem down into two parts:

  1. Create a content type that has create/edit permission restricted to an admin/manager role and has view permissions restricted on a per-user/per-node basis.
  2. Create a block that filters nodes of this type to only show ones that the user can view.

This is my hypothetical approach:

  1. Create a new content type for your user comments.
    • Use either nodeaccess or content_access to provide access control to this type. Both have views integration and are actively being ported to D7. I'd recommend content_access as it's integrated into ACL, a decent module that provides a reusable access control API.
    • Using content_access, "Enable per node access control settings" under the content type's "Access control" tab. This gives admins the option to set who can view each comment.
  2. Create a view with a block display. Filter for the content type. Comments that a user isn't allowed to view should automagically be excluded.
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜