← Back to team overview

mahara-contributors team mailing list archive

[Bug 1122653] Re: artefact_in_view() only supports one level of parentage

 

Hi Aaron,

Can you please check this patch?

** Changed in: mahara
       Status: New => In Progress

** Changed in: mahara
   Importance: Undecided => Medium

** Changed in: mahara
     Assignee: (unassigned) => Matt Oquist (moquist)

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contrib members
https://bugs.launchpad.net/bugs/1122653

Title:
  artefact_in_view() only supports one level of parentage

Status in Mahara ePortfolio:
  In Progress

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


References