mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 16:44:07 +01:00
Some debug for test
This commit is contained in:
parent
58b70c2d08
commit
0b56d0b17f
@ -233,12 +233,16 @@ class AclCommandTest extends CommandBase {
|
||||
*/
|
||||
public function testRemoveForGroupToEmpty()
|
||||
{
|
||||
echo "\n== DEBUG ==\n";
|
||||
echo "Server ACL default: " . $GLOBALS['egw_info']['server']['acl_default']."\n";
|
||||
// Set up
|
||||
$acl = new Acl($this->group_id);
|
||||
$acl->add_repository(static::APP, $GLOBALS['egw_info']['user']['account_id'], $this->group_id, Acl::ADD);
|
||||
$acl->read_repository();
|
||||
$this->assertTrue($acl->check($GLOBALS['egw_info']['user']['account_id'], Acl::ADD, static::APP));
|
||||
|
||||
echo "\nBefore:\n";
|
||||
var_dump($acl->get_all_rights($GLOBALS['egw_info']['user']['account_id']));
|
||||
$data = array(
|
||||
'allow' => false,
|
||||
'account' => $this->group_id,
|
||||
@ -250,9 +254,13 @@ class AclCommandTest extends CommandBase {
|
||||
$command = new admin_cmd_acl($data);
|
||||
$command->run();
|
||||
|
||||
echo "Data:\n";
|
||||
var_dump($data);
|
||||
// Check group
|
||||
$acl = new Acl($this->group_id);
|
||||
$acl->read_repository();
|
||||
echo "Rights:\n";
|
||||
var_dump($acl->get_all_rights($data['location'], static::APP));
|
||||
$this->assertFalse($acl->check($data['location'], Acl::ADD, static::APP));
|
||||
$this->assertEquals(0, $acl->get_specific_rights($data['location'], $data['app']));
|
||||
|
||||
@ -261,11 +269,13 @@ class AclCommandTest extends CommandBase {
|
||||
$acl->read_repository();
|
||||
if($GLOBALS['egw_info']['server']['acl_default'] != 'deny')
|
||||
{
|
||||
echo "DEBUG: Default allow\n";
|
||||
$this->assertTrue($acl->check($data['location'], Acl::ADD, static::APP));
|
||||
}
|
||||
else
|
||||
{
|
||||
// Default is deny
|
||||
echo "DEBUG: Default deny\n";
|
||||
$this->assertFalse($acl->check($data['location'], Acl::ADD, static::APP));
|
||||
}
|
||||
$this->assertEquals(0, $acl->get_rights($data['location'], $data['app']));
|
||||
|
Loading…
Reference in New Issue
Block a user