mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #33337
[Bug 1530611] Re: "Recent journal entries" displays group journal in private portfolio area
This is due to a bug in how group & institution blogs were inserted into
the Journal blocktypes. The blog blocktypes use the "artefactchooser"
Pieform element, which applies this logic to decide which artefacts the
user can select, based on whether the page is owned by a group,
institution, or user:
group: Show site artefacts, and all artefacts in this group which the
user has "view" permission on
institution: Show site artefacts, and artefacts owned by this
institution
user: Show public site artefacts, other site artefacts (if the user is
an admin), artefacts of the user's institutions, group artefacts for the
user's groups if the user has "republish" permission on them, and
finally the user's own artefacts.
When the blog blocktypes were implemented, apparently it was a design
decision that the access for these artefacts should be different, and
limited only to institution blogs for an institution page, group blogs
for a group page, and user blogs for a user page. This was implemented
by adding a list of artefact IDs as a filter to the artefactchooser. The
bug here, is that the code to add that list of artefact IDs, was added
to the "journal" block and the "journal entry" block, but not the
"recent journal entries" block.
Currently that filter code is copied & pasted into both journal &
journal entry separately. The quick fix for 15.10 would be to copy and
paste the code into the "recent journal entries" block as well.
A better fix, which we should probably do for 16.04, is to refactor that
code so that it's shared between all there blog blocktypes, so that if
we make future access changes, we won't have problems. Additionally, the
way it's currently written it writes a SQL query that contains the ID of
*every* artefact owne by the user (or group or institution), which could
be quite large and cause memory problems. We should probably move this
change in logic down into the artefactchooser somewhere.
--
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