mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
Merge branch '3.3.x'
This commit is contained in:
commit
cbeeeee93f
2 changed files with 23 additions and 1 deletions
|
@ -772,7 +772,7 @@ class auth
|
|||
|
||||
$sql_group = ($group_id !== false) ? ((!is_array($group_id)) ? 'group_id = ' . (int) $group_id : $db->sql_in_set('group_id', array_map('intval', $group_id))) : '';
|
||||
$sql_forum = ($forum_id !== false) ? ((!is_array($forum_id)) ? 'AND a.forum_id = ' . (int) $forum_id : 'AND ' . $db->sql_in_set('a.forum_id', array_map('intval', $forum_id))) : '';
|
||||
$sql_is_local = $forum_id !== false ? 'AND ao.is_local <> 0' : '';
|
||||
$sql_is_local = !empty($forum_id) ? 'AND ao.is_local <> 0' : '';
|
||||
|
||||
$sql_opts = '';
|
||||
$hold_ary = $sql_ary = array();
|
||||
|
|
|
@ -149,4 +149,26 @@ class phpbb_functional_acp_permissions_test extends phpbb_functional_test_case
|
|||
$this->assertContainsLang('ACL_M_EDIT', $page_text);
|
||||
$this->assertContainsLang('ACL_M_MOVE', $page_text);
|
||||
}
|
||||
|
||||
public function test_tracing_user_based_permissions()
|
||||
{
|
||||
$this->create_user('newlyregistereduser');
|
||||
|
||||
// Open user-based permissions masks page
|
||||
$crawler = self::request('GET', "adm/index.php?i=acp_permissions&icat=16&mode=view_user_global&sid=" . $this->sid);
|
||||
|
||||
// Select newlyregistereduser
|
||||
$form = $crawler->filter('#add_user')->form(['username' => ['newlyregistereduser']]);
|
||||
$crawler = self::submit($form);
|
||||
|
||||
// Test 1st "Yes" permission tracing result match
|
||||
$trace_link_yes = $crawler->filter('td.yes')->eq(0)->parents()->eq(0)->filter('a.trace')->link();
|
||||
$crawler_trace_yes = self::$client->click($trace_link_yes);
|
||||
$this->assertEquals(1, $crawler_trace_yes->filter('tr.row2 > td.yes')->count());
|
||||
|
||||
// Test 1st "Never" permission tracing result match
|
||||
$trace_link_never = $crawler->filter('td.never')->eq(0)->parents()->eq(0)->filter('a.trace')->link();
|
||||
$crawler_trace_never = self::$client->click($trace_link_never);
|
||||
$this->assertEquals(1, $crawler_trace_never->filter('tr.row2 > td.never')->count());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue