coastercms
coastercms copied to clipboard
turn the file manager into per user style system
I was wondering how would you go about turning the file manager into per user style system.
Basically, I'm thinking of allow users to upload their own avatar or something but I don't want other users to be even able to see who else is in the system.
We do have plans to make it easy to add custom permissions, but currently without modifying the file manager config directly you can't do it through extending Coaster.
At the moment there is a basic access check added to the main config file /public/coaster/filemanager/config/config.php.
And a slightly more custom view/edit check added to per directory config files. /public/uploads/{dir}/config.php
The best way for now I think would be to add something in these files to do per user checks.
You can also set the following session vairable which will limit the filemanager to a folder:
$_SESSION["RF"]["subfolder"] = $path_to_folder;
Thanks, I'll take a look at those ideas.