Drupal 错误地允许匿名用户访问单个编辑页面
我的 Drupal / ubercart 安装有一个奇怪的问题。匿名用户只能访问 s SINGLE 节点(ubercart 产品)的编辑页面 /node/44/edit。我创建了一个新版本的节点,没有这个问题。产品页面上的选项卡(查看/编辑)也可供匿名用户使用。当该页面被垃圾邮件机器人编辑时,问题变得更加明显。
有什么办法可以将 Drupal 做出的决策过程输出到屏幕上吗?例如,我可以将变量输出到 Drupal 用来决定用户是否有权访问给定 URL 的屏幕吗?
提前致谢。
My Drupal / ubercart install has a bizarre issue. Anonymous users can access an edit page /node/44/edit for s SINGLE node only - an ubercart product. I have created a new version of the node, which does not have the issue. The tabs (view / edit) are also available on the product page to anonymous users. The issue became clear when the page was edited by a spam bot.
Is there any way I can output the decision making process which Drupal makes to the screen? For example can I output the variables to the screen which Drupal uses to make the decision about whether the user has access to a given URL or not?
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
可能有更好的方法,但首先,您可以创建一个实现 hook_menu_alter,然后转储 $items 数组的内容,以查看与 /node/44/edit 或 /node/%/edit 关联的访问回调。
There may be a better way, but to start, you could create a custom module that implements hook_menu_alter, then dump the contents of the $items array, to see the access callback associated with /node/44/edit or /node/%/edit.
要尝试的一件事是“重建节点权限”,您可以从管理/内容/节点设置页面执行此操作。这可能就像权限被提升一样简单,这种情况很少见,但有时确实会发生。
One thing to try would be to "rebuild node permissions" You do this from the admin/content/node-settings page. It might be as simple as the permissions being jacked up, which is rare but does happen sometimes.