mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #11656
[Bug 1122653] [NEW] artefact_in_view() only supports one level of parentage
Public bug reported:
I don't really think this is the right answer, but this patch supports
TWO levels of parentage, so kids can have artefacts in folders in
folders, and folks who have access to the view can view and download the
artefacts. Without this patch, if a kid puts an artefact inside a folder
that's inside a folder, users with permission to access the view get an
'access denied' message because artefact_in_view() in lib/mahara.php
doesn't check to see if maybe the parent of the parent of the artefact
is in the view...
Again, hard-coding levels of inheritance like this isn't really
desirable, but checking arbitrary levels of parentage is expensive
unless it's done very carefully.
In any case, I've attached the patch I've applied to our system (we're
running 1.4.1, but 1.6.* appears to have the same issue) to get us
around this problem for now.
Cheers,
Matt
** Affects: mahara
Importance: Undecided
Status: New
** Patch added: "allow TWO levels of parentage for artefacts in a folder in a folder in a view"
https://bugs.launchpad.net/bugs/1122653/+attachment/3524723/+files/mahara-multi-generational-artefact-views.diff
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
https://bugs.launchpad.net/bugs/1122653
Title:
artefact_in_view() only supports one level of parentage
Status in Mahara ePortfolio:
New
Bug description:
I don't really think this is the right answer, but this patch supports
TWO levels of parentage, so kids can have artefacts in folders in
folders, and folks who have access to the view can view and download
the artefacts. Without this patch, if a kid puts an artefact inside a
folder that's inside a folder, users with permission to access the
view get an 'access denied' message because artefact_in_view() in
lib/mahara.php doesn't check to see if maybe the parent of the parent
of the artefact is in the view...
Again, hard-coding levels of inheritance like this isn't really
desirable, but checking arbitrary levels of parentage is expensive
unless it's done very carefully.
In any case, I've attached the patch I've applied to our system (we're
running 1.4.1, but 1.6.* appears to have the same issue) to get us
around this problem for now.
Cheers,
Matt
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1122653/+subscriptions
Follow ups
References