"Access to site files" for using them anywhere
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Confirmed
|
Wishlist
|
Unassigned |
Bug Description
Mahara 16.10
The "Access to site files" option under Admin -> Config site -> Site options -> General settings is currently restricted to making sub folders available in the "Links and resources" menu.
However, when you want to use a file in a subfolder of "public" in a page, people other than the site admin can't see them.
It should be possible to see any files that are in the "public" folder, no matter whether in subfolders or not anywhere else.
It does work properly on mahara.org for the Partner images sitting in TinyMCE in a page that was shared publicly, but I had trouble with images in descriptions in SmartEvidence when I needed to link to the actual file (not through TinyMCE).
All places where "public" is checked would need it be replaced.
At the same time, a setting in the DB should identify a folder as public rather than relying on the folder name "public" as is done at the moment.
For example right now when you rename the folder "public", a new "public" folder is created.
That could then allow institutions to also have public folders (wishlist item bug #1638134)
description: | updated |
Changed in mahara: | |
status: | New → Confirmed |
Currently one way we check if a file can be public is via this (in artefact/ file/download. php):
$public = $fileispublic = $file-> get('institutio n') == 'mahara'; field(' artefact' , 'id', 'id', $fileid, 'parent', ArtefactTypeFol der::admin_ public_ folder_ id());
$public = $public && (bool)get_
So the file can only be public if owned bit 'site' and is a child of the 'public' folder.
Another way we check (as in artefact/ file/downloadfo lder.php) is:
Where files are seen as public if they live on the 'public' folder's path.
So at the very least we should be consistent.
I feel as long as the file lives within a 'public' folder's path then it should be treated as public