You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何查找Drupal指定权限的名称以用于Drush角色赋权命令

Drupal Drush角色权限赋值问题解答
  • “Article: create new content”权限对应的Drush可识别的机器名为create article content,完整可执行命令如下:
drush role-add-perm 'test-role' 'create article content'
  • Drupal核心默认的内容类型创建权限机器名规则为create [内容类型机器名] content,默认Article内容类型的机器名为article,如果你的站点对Article的机器名做过自定义修改,替换命令中对应的article字段即可。
  • 若要确认站点内所有权限的准确机器名,可执行以下命令输出全量权限的显示名称和对应机器名,搜索匹配即可:
# Drush 8及更早版本
drush perm-list

# Drush 9及更新版本
drush permission:list

内容的提问来源于stack exchange,提问作者Reddy Rohit

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.09.24 06:24:04