Set permissions on file
Permalink
Hi,
In an add-on I import some files. The files are stored in a folder (or set) per year. Now I want to set permissions on that file. With a page there is something like $page->assignPermissions(...), but how do I do that with files?
Thanks!
In an add-on I import some files. The files are stored in a folder (or set) per year. Now I want to set permissions on that file. With a page there is something like $page->assignPermissions(...), but how do I do that with files?
Thanks!
I've taken the code from the Filesystem::setDefaultPermissions and played around with it.
When I check the permissions on the file, I see that (only) the given user has view rights.