In implementing this I noticed that at some point we added code to the get_sharedviews_data() method that checks the start and end date for the group's view_access record. But, we were still missing code to check the overriding start and end date (which is stored in view.startdate and view.enddate). We also had no code to check for collections to check for any of the start and end dates.
My patch fixes all of these scenarios. So, to test this patch fully, you'll need to create and share pages and collections with a group, with future start dates and past end dates, on both the group access line and the total page access line. In all there are 8 permutations, plus it's good to add another 2 without start and end dates to make sure they still show up. 1. Create Group Z 2. Create these pages, and share them with the Group Z. (In order to create past end dates, the easiest thing is to set an end date 1 day in the future, then move your system clock forward 1 week. This is obviously not possible in Behat, so for automated testing we can just skip testing the past end dates. Or do a direct database update.) - Page 1: future start date on group access - Page 2: past end date on group access - Page 3: future start date on total page access - Page 4: past end date on total page access - Page 5: no start/end date - Collection 1: future start date on group access - Collection 2: past end date on group access - Collection 3: future start date on total page access - Collection 4: past end date on total page access - Collection 5: no start/end date 3. Make sure Group Z's homepages has a "Group Pages" block on it, and that it is set to display pages and collections shared with the group. 4. View Group Z's homepage Expected Result: You should only see Page 5 and Collection 5. Actual Result: You see Pages 3, 4, and 5, and Collections 1, 2, 3, 4, and 5. -- 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/1374163 Title: List of shared pages to a group not taking account of access date Status in Mahara ePortfolio: In Progress Status in Mahara 1.10 series: Won't Fix Status in Mahara 1.8 series: Won't Fix Status in Mahara 1.9 series: Won't Fix Status in Mahara 15.04 series: In Progress Status in Mahara 15.10 series: In Progress Bug description: Version: master(1.10) and previous version Browser, platform: any When I clicked a shared page in the list of shared pages in the group homepage (htdocs/group/view.php), I got "Access denied" message. Steps 1. Login as user A, create a page, share the page to a group Z 2. Set the 'Overriding start date' to a future date 3. Login as a member of group Z 4. In the group Z homepage, click the page shared by the user A You will see the "Access denied" message. Expected result: The page shared by the user A to the group Z should not be displayed in the list until the date set by 'Overriding start date' To manage notifications about this bug go to: https://bugs.launchpad.net/mahara/+bug/1374163/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~mahara-contributors Post to : [email protected] Unsubscribe : https://launchpad.net/~mahara-contributors More help : https://help.launchpad.net/ListHelp

