Giving access to 2 pages only generates 1 access notification

Bug #1380203 reported by Kristina Hoeppner on 2014-10-12
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
High
Robert Lyon
1.10
High
Robert Lyon
15.04
High
Robert Lyon

Bug Description

1.10RC1 (but probably general issue)

Test case:

1. User A is friends with user B.
2. User A shares two separate pages, Page 1 and Page 2 (i.e. they aren't in a collection) with "Friends".
3. User B receives a "New page access" notification for Page 1 but not for Page 2. Since the 2 pages are not in a collection, user B doesn't know that she actually also has access to that other page.

Access notifications for separate pages should always list all pages to which the user has access to.

Robert Lyon (robertl-9) on 2014-10-13
Changed in mahara:
assignee: nobody → Robert Lyon (robertl-9)
milestone: none → 1.11.0
Robert Lyon (robertl-9) wrote :

Ok what happens is that when one updates the view access for a bunch of pages at once the update_view_access() function goes and sets the new access for the first item via set_access() and then duplicates those access rules for the others with copy_access().

The problem is the set_access() triggers the activity notification and copy_access() does not so only the first item get notified for.

What is needed is to be able to trigger the notify for each item.

What would be good would be to ignore the notification trigger in the set_access() if we have more than one item to notify for and instead do a notify with message that includes all items we are dealing with.

Aaron Wells (u-aaronw) wrote :

I agree. It would probably be better, under our current notification system, to send just one notification that says "You gained access to these pages" rather than a separate notification for each page.

+1

Eduardo (o-eduardo) wrote :

How to test:
***Run cron after sharing the page.

1. Log in as user “admin”
2. Go to “Administration” → “Users → Create user “Bob”
3. Go to “Return to site”
4. Go to “Portfolio” → “Create page” → Create 2 pages
5. Go to “Shared by me”
6. Click on “Edit access” → “Testing page 1”
7. Click “Select all” from “Pages”
8. Click on “Share with other users and groups”
9. Select “Users” from “Search” → Search for user “Bob”
10. Select user “Bob” → Click on “Save”
11. Run cron.php***
12. Log out as user “admin” → Log in as user “Bob”
13. Go to “Notifications” → I should see a notification from both pages → Passed

Reviewed: https://reviews.mahara.org/4094
Committed: http://gitorious.org/mahara/mahara/commit/cd66b62794c868b20c1ed6fb95275c2995423c13
Submitter: Son Nguyen (<email address hidden>)
Branch: master

commit cd66b62794c868b20c1ed6fb95275c2995423c13
Author: Robert Lyon <email address hidden>
Date: Tue Oct 28 13:42:59 2014 +1300

Altering view_access change notification (Bug #1380203)

Trying to list all pages that are changed in the notification email,
even when they are part of a collection.

Change-Id: I045a324b4ceb4892646a3f8210bef41806ebf5e0
Signed-off-by: Robert Lyon <email address hidden>

Reviewed: https://reviews.mahara.org/4142
Committed: http://gitorious.org/mahara/mahara/commit/5584e34be6d79dc128c1e85405ef36069d3d3172
Submitter: Robert Lyon (<email address hidden>)
Branch: 1.10_STABLE

commit 5584e34be6d79dc128c1e85405ef36069d3d3172
Author: Robert Lyon <email address hidden>
Date: Tue Oct 28 13:42:59 2014 +1300

Altering view_access change notification (Bug #1380203)

Trying to list all pages that are changed in the notification email,
even when they are part of a collection.

Change-Id: I045a324b4ceb4892646a3f8210bef41806ebf5e0
Signed-off-by: Robert Lyon <email address hidden>

Robert Lyon (robertl-9) on 2015-04-17
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