Hide suspended users' pages from the "Latest Pages" block

Bug #1252885 reported by Aaron Wells on 2013-11-19
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Aaron Wells

Bug Description

I noticed this one on mahara.org. When you suspend a user, their Pages are no longer accessible (going to one gives you an "access denied" error). BUT, they still show up in the "Latest Pages" block.

Aaron Wells (u-aaronw) on 2013-11-19
Changed in mahara:
milestone: none → 1.9.0
assignee: nobody → Aaron Wells (u-aaronw)
importance: Undecided → Medium
status: New → Confirmed
Aaron Wells (u-aaronw) wrote :

The data in the newviews block comes from view_search(), a function which is meant to return only views that the specified user has access to. So, it would probably make the most sense to add a filter there to prevent the inclusion of views from suspended users, since the user does not have access to them.

On the other hand, would this cause performance issues? Adding one more table to the already-costly latest views query?

Reviewed: https://reviews.mahara.org/2723
Committed: http://gitorious.org/mahara/mahara/commit/5d9d9d1255dfef6cbd6a662b7202d12ec67c436e
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 5d9d9d1255dfef6cbd6a662b7202d12ec67c436e
Author: Aaron Wells <email address hidden>
Date: Wed Nov 20 12:00:32 2013 +1300

Hide suspended users' pages from "new views" and search results

Bug 1252885

Change-Id: Ib974aa7c4ae777fa5579fe50d02b18a43cf1c5d8

Aaron Wells (u-aaronw) wrote :

Given how touchy the view_search() method is, and that this is a fairly minor bug, it's probably best not to backport this one.

no longer affects: mahara/1.6
no longer affects: mahara/1.7
Aaron Wells (u-aaronw) on 2014-04-08
Changed in mahara:
status: Confirmed → Fix Committed
Robert Lyon (robertl-9) on 2014-04-22
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers