Drupal匿名用户权限问题

发布于 2024-08-17 13:01:12 字数 777 浏览 8 评论 0原文

我已经绞尽脑汁思考如何解决这个问题几个小时了,我知道我不是第一个遇到这个问题的人。

我在授予匿名用户访问 Drupal 6.15 中的节点内容时遇到问题。我已经尝试了一切,包括插入 MySQL、检查并仔细检查每个可用的权限设置(是的,我启用了“访问内容”)、重建权限和清除缓存。我已经禁用了自定义模块,希望能够消除冲突,但仍然没有成功。匿名用户在除自定义日历视图页面之外的任何地方都会看到“访问被拒绝”页面。

我已经尝试过这些查询,但它们只是已有内容的重复:

INSERT INTO users (uid, name, mail) VALUES (0, '', '');
INSERT INTO users_roles (uid, rid) VALUES (0, 1);
INSERT INTO node_access VALUES (0, 0, 'all', 1, 0, 0);

我唯一的一线希望:开发模块的“用户访问权限”显示确实显示 user:Anonymous 无法查看内容(参见图片)。它提出了一个令人困惑的问题:“所有用户都可以查看所有节点”,而 user:Anonymous 同时具有“NO:访问内容”,这是怎么回事???

这让我抓狂。如果有人能提醒我做错了什么,我会兴奋地跳上跳下,如果你在西雅图,我会请你喝啤酒。

谢谢!

替代文本 http://see Threeblog.com/images/devel.png

I have been wracking my brain on how to solve this issue for hours now, and I know I'm not the first one to encounter it.

I am having trouble granting anonymous users access to node content in Drupal 6.15. I have tried everything, including inserts to MySQL, checking and double-checking every permissions setting available (yes, I have enabled "Access content"), rebuilding permissions, and clearing the cache. I have disabled custom modules in hopes of clearing out a conflict but still no luck. Anonymous users get the "Access Denied" page everywhere but on a custom calendar View page.

I have tried these queries, but they are just duplicates of what is already there:

INSERT INTO users (uid, name, mail) VALUES (0, '', '');
INSERT INTO users_roles (uid, rid) VALUES (0, 1);
INSERT INTO node_access VALUES (0, 0, 'all', 1, 0, 0);

My only glimmer of hope: the Devel Module's "Access Permissions by User" display indeed shows that user:Anonymous cannot view content (SEE IMAGE). It raises a baffling question: how is it that "All users may view all nodes" while user:Anonymous simultaneously has "NO:access content" ???

This is driving me nuts. If anyone can alert me as to what I am doing wrong, I will jump up and down in excitement, and buy you a beer if you are in Seattle.

THANKS!

alt text http://seethreeblog.com/images/devel.png

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

撕心裂肺的伤痛 2024-08-24 13:01:12

这是 Drupal 非常典型的情况:权限问题。虽然我知道我可能无法提供正确的答案,但也许至少我会在你身上引发一些革命性的想法,帮助你解决问题。

虽然节点访问是应该打开的标准权限,但还有其他权限可能会限制用户。你有免费链接吗?如果是这样,请检查免费链接访问是否也已打开。您可能需要确保访问控制模块(ACL 和依赖它的模块,例如论坛访问)不会妨碍您。此外,分类访问控制可能很麻烦:我在使用分类访问控制 Lite (tac_lite) 时遇到了问题。如果有的话也尝试禁用它。

我很抱歉无法提供比这更具体的内容,但 Drupal 就是这样。解决权限问题很少需要破解代码。

This is very typical of Drupal: permissions problems. While I'm aware I'll probably be unable to offer the correct answer, maybe at least I'll trigger some revolutionary idea in you that will help you solve the problem.

While node access is a standard permission that should be on, there are others that might restrict the users. Do you have freelinking on? If so, check that the freelinking access is also on. You might want to make sure that access control modules (ACL and ones that rely on it, such as Forum Access) don't get in the way. Also, taxonomy access control can be a pain: I've had problems with Taxonomy Access Control Lite (tac_lite). Try disabling it too if you have it.

I apologise for not being able to offer anything more specific than this, but Drupal is just like that. Solving permissions issues rarely requires hacking the code.

遮云壑 2024-08-24 13:01:12

通过 Drupal: http://drupal.org/node/64114

这个为我做到了:
'你尝试过重建权限吗?转到管理/内容/节点设置并单击“重建权限”。

Via Drupal: http://drupal.org/node/64114

This one did it for me:
'Did you try rebuilding permissions? Go to admin/content/node-settings and click "Rebuild permissions".'

甜尕妞 2024-08-24 13:01:12

自从从 6.14 升级到 6.15 以来,我遇到了完全相同的问题。仅在 2 个不同的本地 OSX 系统上进行了尝试,因此很想找到与您的服务器相关的问题...与 PHP 版本相关 - 我在所有安装上都运行 PHP5.2。

重建权限表并查看每个可能的用户权限,但匿名用户得到相同的“请登录以继续”。看起来值得在 Drupal 问题队列中发布问题。

I've had exactly the same problem since upgrading from 6.14 to 6.15. Tried only on 2 difference local OSX systems, so intrigued to find your server related problems... is PHP version related - I'm running PHP5.2 on all installs.

Rebuilt permissions table and looked at every conceivable user permission, but anon users get the same 'Please Login to Continue'. Looks like it's worth posting an issue in the Drupal issue queue.

谁与争疯 2024-08-24 13:01:12

自从我使用 6.15 以来,我遇到了左右权限问题。该网站在 6.14 中并未进行 100% 调试,因此我不能从逻辑上说这肯定是 6.15 的错误,但我的直觉可以而且确实如此。

我有一个称为内容管理员的角色,它拥有所有内容类型的所有 CRUD(创建、读取、更新、删除)权限。

为了让系统管理员(用户#1)编辑故事,我必须赋予它这个角色。现在我在让这个角色编辑故事时遇到问题。分配了该角色的用户会收到“访问被拒绝”错误。

我唯一拥有的操作权限的其他模块是“角色委托”,因此某些最终用户可以被授予分配角色的权限,但不能编辑角色或为角色分配权限。我仍然需要追查这个问题以及权限表损坏的可能性。但6.15是罪魁祸首的可能性仍然存在。

Since I went to 6.15 I've had problems with permissions left and right. The site wasn't 100% debugged in 6.14 so I can't say logically it definitely was 6.15's fault, but my intuitions can and do say so.

I have a role I call content manager that has all the CRUD (create, read, update, delete) permissions on all content types.

To let the System Admin (user #1) edit stories I had to give it that role. Right now I'm having problems letting that role edit stories. A user with that role assigned gets 'access denied' errors.

The only other module I have that manipulates permissions is 'role delegation' so certain end users can be given access to assigning roles, but not edit roles or to assigning permissions to roles. I still have to chase down this and the possibility of a corrupt permission table. But the possibility that 6.15 is the culprit still exists.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文