Force ownership (user / group)

The problem is as follows: we have several domains in a site with responsible for publishing content in each and every of these domains. We want to restrict content editing  by domain while allowing some users to create and edit content in several domains.

In my own case, I have a multiple-tree TYPO3 website:

and writers who are associated with each of these domains. The editing security options are made so that only the owner and editors of the domain X (eg. marly.paroisse.ch) are allowed to edit the content:

Permission Problem

Once a user has rights to write on several domains, pages that are created automatically inherit the first domain associated with him, making it impossible for a writer of the original domain to edit them afterwards:

Solution

The trick is to edit the PageTS of the root domain (in this case the node “Paroisse de Marly” in our case) to force the group associated with page’s permissions:

TCEMAIN.permissions {
        # User can do anything (default):
    user = show,edit,delete,new,editcontent
        # Group can do anything
        # (normally "delete" is disabled)
    group = show,edit,delete,new,editcontent
        # Everybody can at least see the page
        # (normally everybody can do nothing)
    everybody = show
}
 
# Owner be_groups UID for new pages
TCEMAIN.permissions.groupid = 2
 
# Owner be_users UID for new pages
# TCEMAIN.permissions.userid = 3
Flattr