Search code examples
typo3extbasetypo3-8.xtypo3-extensions

TYPO3: what is the field "access_group" for?


I don't know what is the field "access_group int(11) DEFAULT 0 NOT NULL" for? First I thought it's for restriction by user_group, but there is an field "fe_group varchar(100) DEFAULT '' NOT NULL" for it. You can find the field also at the documentation Preparing the database , but I couldn't find a description for it, only for "fe_group".


Solution

  • access_group is the be_user group.

    In TYPO3 you have an access-system similar to the unix-rights, where you can grnat access to pages (and records in the page).

    There is a menu entry System->Access where you select a page and can set values for multiple levels recursive:

    You can set Owner and Group and the granted rights which are assigned for
    Owner, Group, Everybody

    the rights are coded bitwise (other order than displayed):

    1 (2^0) Show page: Show/Copy page and content.
    2 (2^4) Edit content: Change/Add/Delete/Move content.
    3 (2^1) Edit page: Change page eg. change pagetitle etc.
    4 (2^2) Delete page: Delete/Move page and content.
    5 (2^3) New pages: Create new pages under this page.

    These values can be set with TCEMAIN in the page TSconfig, so all pages in a sub tree might get the same rights.


    Example:

    TCEMAIN.permissions {
        userid = 43
        groupid = 5
        user = 31
        group = 19
        everybody = 1
    }
    
    • Each page will get the user with the uid 43 as owner,
    • the group will be the group with the uid 5,
    • the owner has every right,
    • the group can show page, edit page, edit content but can not delete page or create new pages below
    • every one else can see the page

    Alternatively you can set the rights by keywords:

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

    comment from Rudy Gnodde, which I agree:

    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).

    As TYPO3 manuals can be edited by everyone (there is a button Edit me on GitHub in the upper right corner), I have proposed a correction.