Drupal - 对用户隐藏高级帖子设置

发布于 2024-09-24 18:17:18 字数 931 浏览 3 评论 0 原文

我在 Drupal 允许的权限海洋中迷失了方向。

我有一个内容类型,其中的修订版和工作流程设置都设置得很好,但我不希望我的用户能够看到这些选项(每次自动新修订版等)。

据我了解,当您禁用“管理节点”字段时,此信息就会消失,但是当我禁用此字段时,这些用户用于编辑节点的链接就会消失。

那么我的问题是双重的:

  1. 向用户隐藏此访问权限的正确方法是什么

  2. 如果禁用“管理节点”是关键,那么如何我指挥我的 用户在创建内容类型后是否有权编辑其内容类型? (目前它指向admin/content/node

我已经看到了涉及覆盖 template.php 文件的解决方案,但我不想这样做。

编辑

以下是行为的说明:

当前权限

                                 special role
administer nodes                     [x]
create <custom> content              [x]
delete any <custom>content           [x]
delete own <custom>content           [x]
edit any <custom> content            [x]

因此,通过此设置片段,我的用户可以看到“修订信息”、“发布选项”等内容 。

我希望这些高级功能不会出现在他们身上 据我所知,这可以通过禁用“管理节点”来控制。

问题是,如果未选中此选项,我的用户将失去菜单中指向编辑我的内容的选项。目前,这指向admin/content/node

I'm getting lost in the sea of allowable permissions in Drupal.

I have a content-type which has revision and workflow settings all nicely setup, but I do not want my users to be able to see these options (new revision each time automatically, etc).

From what I understand, this information goes away when you disable the 'administer node' field, however when I disable this my link for editing nodes disappears for these users.

My question is twofold then:

  1. What is the proper way to hide this access from users

  2. If disabling 'administer nodes' is the key, then how do I direct my
    users to have access to edit their content-type once it is created?
    (currently it points to admin/content/node)

I have seen solutions that involve overriding the template.php file, but I'd rather not do this.

Edit

Here is a clarification of the behavior:

Current permissions

                                 special role
administer nodes                     [x]
create <custom> content              [x]
delete any <custom>content           [x]
delete own <custom>content           [x]
edit any <custom> content            [x]

So, with this snippet of settings, my users can see things like 'revision information,' 'publishing options,' etc.

I want these advanced features to NOT appear for them. What I have learned is that this can be controlled by disabling 'administer nodes.'

The problem is that when this is unchecked, my users lose the option in their menu which points to editing my content. Currently, this points to admin/content/node

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

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

发布评论

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

评论(2

去了角落 2024-10-01 18:17:18

也许我误解了你的问题,因为我要推荐的解决方案非常简单:在权限页面中有一个权限,编辑任何故事内容,编辑任何页面内容...对于您想要的所有用户,您可以为他们分配角色并在此处标记复选框。这将允许他们仍然编辑节点,但如果您检查了管理节点权限,则将避免您在节点编辑表单中看到的所有额外垃圾。

编辑:正如我在下面的评论(以及googletorp)中所指出的,要获得像admin/content/node这样的东西,你必须使用VBO(Views Bulk操作)(禁用管理节点后)

Perhaps I'm misunderstanding your question as the solution I'm going to recommend is very straighforward: In the permissions page there is a permission, edit any story content, edit any page content... for all the users you want, you can assign them a role and mark the checkbox here. This will allow them to still edit the nodes and yet will avoid all the extra junk that you see in the node edit form that you get if you have the administer nodes permission checked.

Edit: As pointed out in my comment below (and by googletorp), to get something like admin/content/node you'll have to build it using VBO (Views Bulk Operations) (after disabling administer nodes)

别把无礼当个性 2024-10-01 18:17:18

您可以创建自己的 admin/content/node 版本并对其进行调整,以仅显示用户创建的节点。

使用 Views查看批量操作。我相信 VBO 附带了一个预先构建的视图,它已经可以做到这一点,您可以根据自己的喜好进行调整。

You can create your own version of admin/content/node and tweak it, to fx only show nodes created by the user.

Doing this is quite easy with Views and Views bulk operations. I believe VBO comes with a prebuilt view that does this already, that you can tweak into your liking.

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