TYPO3:字段 "access_group" 是做什么用的?

TYPO3: what is the field "access_group" for?

我不知道字段 "access_group int(11) DEFAULT 0 NOT NULL" 是做什么用的?一开始我以为它是为了user_group的限制,但是有一个字段"fe_group varchar(100) DEFAULT '' NOT NULL"。您也可以在文档 Preparing the database 中找到该字段,但我找不到它的描述,只有 "fe_group".

access_groupbe_user 组。

在 TYPO3 中,您有一个类似于 unix-rights 的 access-system,您可以在其中访问页面(和页面中的记录)。

有一个菜单项 System->Access,您可以在其中 select 一个页面并可以递归设置多个级别的值:

您可以设置 OwnerGroup 以及分配给
的授予权限 所有者所有人

权限按位编码(与显示顺序不同):

1 (2^0) 显示页面:Show/Copy 页面和内容。
2 (2^4) 编辑内容:Change/Add/Delete/Move 内容。
3 (2^1) 编辑页面:更改页面,例如。更改页面标题等
4 (2^2) 删除页面:Delete/Move 页面和内容。
5 (2^3) 个新页面:在此页面下创建新页面。

这些值可以在页面 TSconfig 中使用 TCEMAIN 设置,因此子树中的所有页面都可能获得相同的权限。


示例:

TCEMAIN.permissions {
    userid = 43
    groupid = 5
    user = 31
    group = 19
    everybody = 1
}
  • 每个页面都会将 uid 为 43 的用户作为所有者,
  • 该组将是 uid 5 的组,
  • 所有者拥有一切权利,
  • 组可以show pageedit pageedit content但不能delete pagecreate new pages以下
  • 其他人都可以看到该页面

或者您可以通过关键字设置权限:

TCEMAIN.permissions {
    userid = 43
    groupid = 5
    user = show, edit, delete, new, editcontent
    group = show, edit, editcontent
    everybody = show
}

来自 Rudy Gnodde 的评论,我同意:

This is only used for pages, not in custom tables for extensions. It's probably a mistake in this documentation. It should be fe_group I think (which is mentioned in this documentation, but not in the code example which contains access_group).

由于TYPO3的说明书大家都可以编辑(右上角有个按钮Edit me on GitHub),所以提出更正。