Forum OpenACS Development: Problem with file-storage

Collapse
Posted by Peter Alberer on

I think i found a problem with file-storage. When file-storage is mounted under a subsite (not the main subsite) and inherit permission is turned off for the subsite -> even subsite-admins cannot access the file-storage root folder.

This is because the admin-user has admin for the apm-package (instance) but the permission check looks for "read" rights on the created content- folder in the CR. This folder has context-id -100 (=page) and not the context-id of the apm-package.

Should not the context be the id of the subsite ?

Collapse
Posted by Jowell Sabino on
The context_id is assigned the parent_id of where you put your stuff in CR under (unless you explicitly assign a different context_id, which FS never does), e.g. a file placed under a folder will have a context_id equal to the parent_id = folder_id of the folder. Since the root folder must be placed under something, there is a magic entry "Page" in CR that is the "root of all root folders", and it's context_id is -100. Thus, all root folders will have a context_id of -100.

The permission hierarchy is taken care of by the package_id of the FS instance, which you can find in fs_root_folders. I think your problem is related to this thread.