← Back to team overview

mahara-contributors team mailing list archive

[Bug 1530611] Re: "Recent journal entries" displays group journal in private portfolio area

 

It may make sense to just strip down get_artefactchooser_artefacts to be
much, much simpler than it currently is. That method has a lot of
outdated access control code in it. It looks like it was probably the
method at one time used for selecting file artefacts, but they were long
ago changed to use the Pieform "filebrowser" element instead, which has
a different underlying method for retrieving the eligible artefacts.

Once the file artefacts were refactored away from "filechooser", the
remaining blocktypes using it were blog, profile, and resume, none of
which were available as group or institution artefacts until we added
group & institution blogs in Mahara 15.10. Consequently the group &
institution blogs inherited this dusty outdated access control that was
originally meant for files.

That being the case, I think the best thing to do is to strip out all
the convoluted access stuff in get_artefactchooser_artefacts(), and make
it so that it basically matches the access model for blogs. We may even
get a performance boost out of that. The other place it gets called is
in BlockInstance->rebuild_artefact_list(), which gets called every time
a block is updated, to get the list of artefacts "allowed" in that
block. If we change it so that *only* the file artefact uses the
convoluted version of the query with checks for group file permissions
etc, then it may improve the save time for all the other block types.

-- 
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/1530611

Title:
  "Recent journal entries" displays group journal in private portfolio
  area

Status in Mahara:
  Confirmed
Status in Mahara 15.10 series:
  Confirmed
Status in Mahara 16.04 series:
  Confirmed

Bug description:
  Mahara 15.10+

  When you have a journal entry in a group forum and you select the
  "Recent journal entries" block on a personal portfolio page (not a
  group portfolio page), you see the group journal listed.

  This is not the case for the blocks "Journal" and "Journal entry". Th
  group journal should only be visible for a group page.

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1530611/+subscriptions


References