mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #21026
[Bug 1356638] Re: Can not see the image in the static page "Home" for logged-in users
Ok, the way I see this problem is:
If I add a file to site files in the root dir (not public folder) I can
see this image if I add it to a static page (as admin) but if I log in
as a non admin I can't see it.
I believe this is related to the site config setting "Access to site files"
-- "If checked, logged-in users will have access to site files in subfolders. By default, only files in the top level directory are accessible to them."
So it's failing on the check for allowing download of artefact if the
artefact is in the site -> files root dir.
It looks to be this line in artefact/file/download.php
$fileinloggedinmenu = $fileinloggedinmenu && record_exists('site_menu', 'file', $fileid, 'public', 0);
it's only allowing access to site files if they exist in the site_menu
But that doesn't seem in keeping with the statement "By default, only
files in the top level directory are accessible to them."
Do we even need the record_exists('site_menu', 'file', $fileid,
'public', 0) bit?
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1356638
Title:
Can not see the image in the static page "Home" for logged-in users
Status in Mahara ePortfolio:
New
Status in Mahara 1.10 series:
New
Status in Mahara 1.11 series:
In Progress
Status in Mahara 1.8 series:
New
Status in Mahara 1.9 series:
New
Bug description:
Version: master(1.10), 1.9, 1.8
Platform: any
Browser: any
Steps to reproduce the issue
1. Login as a site admin, add a site image file out of the 'public' folder
2. Add the image into the static page Home (Dashboard)
3. Logout and login as a normal user
Expected result: the image should display in my dashboard
Actual result: the image is not accessible
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1356638/+subscriptions
References