expired shared pages still display in groups
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Fix Released
|
High
|
Robert Lyon |
Bug Description
When a page is shared with a group it appears in Group Pages->Pages shared with this group. If the page has a time restriction, it will still show in Pages shared with this group even if the end date has expired or if the start date is has not begun. The permission are correct in that if a user who does not have permission to view the page outside of the time restriction tries to access it, they cannot access the page.
It would be better if Pages shared with this group only lists pages that is accessible to group. This can be done by altering line 3997 in ./lib/view.php in function get_sharedviews
WHERE a.group = ? AND m.member = ? AND (v.group IS NULL OR v.group != ?);
to
WHERE a.group = ? AND m.member = ? AND (v.group IS NULL OR v.group != ?) AND (a.startdate <= current_timestamp OR a.startdate IS NULL) AND (a.stopdate > current_timestamp OR a.stopdate IS NULL)';
Checked on version 1.8 and 1.10.
Changed in mahara: | |
status: | In Progress → Fix Committed |
Changed in mahara: | |
status: | Fix Committed → Fix Released |
Patch for "master" branch: https:/ /reviews. mahara. org/4522