Commit 9dc059b7 authored by Aaron Wells's avatar Aaron Wells Committed by Gerrit Code Review

Merge "Bug 1493199: Restrict latest views block to others content only"

parents 16a79749 fa352eff
......@@ -34,7 +34,7 @@ class PluginBlocktypeNewViews extends MaharaCoreBlocktype {
require_once('view.php');
$configdata = $instance->get('configdata');
$nviews = isset($configdata['limit']) ? intval($configdata['limit']) : 5;
$view = $instance->get_view();
$sort = array(array('column' => 'mtime', 'desc' => true));
$views = View::view_search(
null, // $query
......@@ -50,7 +50,7 @@ class PluginBlocktypeNewViews extends MaharaCoreBlocktype {
null, // $accesstypes
null, // $tag
null, // $viewid
null, // $excludeowner
$view->get('owner'), // $excludeowner
true // $groupbycollection
);
$smarty = smarty_core();
......
......@@ -12,6 +12,7 @@ Background:
Given the following "permissions" exist:
| title | accesstype | accessname | allowcomments | approvecomments |
| page1 | public | public | 1 | 0 |
| page2 | loggedin | loggedin | 1 | 0 |
Scenario: Adding and deleting public comments
# Adding
......@@ -48,7 +49,7 @@ Scenario: Adding and deleting public comments
And I should not see "Comment removed"
Scenario: Comments update the page's mtime
Given I log in as "pageowner" with password "password"
Given I log in as "admin" with password "Kupuhipa1"
# Set New Views to only show me the most recently updated page
And I follow "Edit dashboard"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment