Okay I found a way to do it, but it is a lot of work.
I would have to create a snippet or something that check the following tables for userID and documentID.
1. document_groups
2. web_groups
3. webgroup_access
If a group for the document or user doesn’t exist yet, it should create them AND the names in webgroup_names and documentgroup_names.
My idea was to put the id’s of the pages the users are allowed to visit in the comment box delimited by ’,’.
Isn’t there a easier way? Is there a snippet or module that does this already?