我有一组记录,其中 1 列称为“站点”(我为此使用了 CCK)
我希望一些用户访问站点 A 数据,而其他用户只访问站点 B
我启用了配置文件模块,添加一个名为站点的自定义字段,然后为用户1,我将该站点字段的值设置为 A,对于用户 2,我将其设置为 B
但是,我不知道如何在 Drupal 视图中指定过滤器以将 CCK 对象中的“站点”字段与当前登录用户的配置文件中的“站点”字段
无论如何要执行此操作或任何其他等效方法来限制对基于用户配置文件中的自定义字段的数据的访问?
谢谢
I have a set of records which 1 column called "Site" (I used CCK for this)
I want some user to access Site A data while others just access Site B
I enabled Profile module, add a custom field called Site, then for user 1, I set the value of that Site field to A, and for user 2, I set it to B
However, I don't know how to specify the Filters in Drupal Views to compare that "Site" field in CCK object with the "Site" field in the Profile of current logged in Users
Anyway to do this or any other equivalent way to restrict access to data based on custom fields in User Profile ?
Thanks
发布评论
评论(1)
您可能想查看内容配置文件模块:http://drupal.org/project/content_profile 。它允许您创建新的内容类型来扩展用户配置文件。这样,内容配置文件本质上是节点,将为您提供视图中更大的灵活性。
另外,我不确定我完全理解你的问题。你说:
这听起来像您需要设置不同的角色来分配用户并使用 Drupal 的访问控制模块之一,例如内容访问:
http://drupal.org/project/content_access
http://more.zites.net/content_access_for_drupal_6
You might want to check out the content profile module: http://drupal.org/project/content_profile. It allows you to create a new content type to extend the user profile. With this, content profiles are essentially nodes and will give you more flexibility within views.
Also, I'm not sure I completely understand your problem. You state:
This sounds like you need to set up different roles to assign users and use one of Drupal's access control modules like content access:
http://drupal.org/project/content_access
http://more.zites.net/content_access_for_drupal_6