标签: drupal-permissions

如何为特定节点提供特定用户编辑权限?

如何为特定节点提供特定用户编辑权限?

我有一个名为"Student"的用户角色.多个用户具有该角色,其中只有少数用户可以编辑节点.我怎么能意识到这一点?

drupal drupal-permissions drupal-roles

8
推荐指数
1
解决办法
2万
查看次数

Hook perm适用于多种内容类型

Drupal 6.x

我有这个模块管理四种不同的内容类型.就此而言,如何为同一模块中的每个内容定义权限?这甚至可能吗?我无法弄清楚如何为每个内容类型定义权限cuz hook_perm必须使用模块名称命名,并且它没有任何参数(如hook_access $ node)来返回内容类型的权限.这是我想做的 -

function mymodule_perm() 
{
if(content1)    
return array(
    'create content1 node',
    'edit content1 nodes',
    'delete content1 nodes',
);
if(content2)    
return array(
    'create content2 node',
    'edit content2 nodes',
    'delete content2 nodes',
);
if(content3)    
return array(
    'create content3 node',
    'edit content3 nodes',
    'delete content3 nodes',
);
.......
}
Run Code Online (Sandbox Code Playgroud)

任何帮助将受到高度赞赏.

drupal drupal-hooks drupal-permissions drupal-content-types

1
推荐指数
1
解决办法
1035
查看次数

阻止Drupal的许可

是否可以在Drupal中显示一个特殊用户名的菜单?

drupal drupal-permissions

0
推荐指数
1
解决办法
1706
查看次数