mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 18:03:17 +00:00
PHRAS-508_acl-cache
- wip
This commit is contained in:
@@ -20,10 +20,10 @@ class ACLManipulatorTest extends \PhraseanetTestCase
|
||||
$databoxId = $databox->get_sbas_id();
|
||||
|
||||
$acl->update_rights_to_sbas($databoxId, [
|
||||
'bas_manage' => '0',
|
||||
'bas_modify_struct' => '0',
|
||||
'bas_modif_th' => '0',
|
||||
'bas_chupub' => '0'
|
||||
\ACL::BAS_MANAGE => '0',
|
||||
\ACL::BAS_MODIFY_STRUCT => '0',
|
||||
\ACL::BAS_MODIF_TH => '0',
|
||||
\ACL::BAS_CHUPUB => '0',
|
||||
]);
|
||||
|
||||
foreach ($databox->get_collections() as $collection) {
|
||||
@@ -32,24 +32,24 @@ class ACLManipulatorTest extends \PhraseanetTestCase
|
||||
$acl->set_masks_on_base($baseId, '1', '1', '1', '1');
|
||||
|
||||
$acl->update_rights_to_base($baseId, [
|
||||
\ACL::CANPUTINALBUM => '0',
|
||||
\ACL::CANDWNLDHD => '0',
|
||||
\ACL::CANPUTINALBUM => '0',
|
||||
\ACL::CANDWNLDHD => '0',
|
||||
'candwnldsubdef' => '0',
|
||||
\ACL::NOWATERMARK => '0',
|
||||
\ACL::CANDWNLDPREVIEW => '0',
|
||||
\ACL::CANCMD => '0',
|
||||
\ACL::CANADMIN => '0',
|
||||
\ACL::CANREPORT => '0',
|
||||
\ACL::CANPUSH => '0',
|
||||
\ACL::NOWATERMARK => '0',
|
||||
\ACL::CANDWNLDPREVIEW => '0',
|
||||
\ACL::CANCMD => '0',
|
||||
\ACL::CANADMIN => '0',
|
||||
\ACL::CANREPORT => '0',
|
||||
\ACL::CANPUSH => '0',
|
||||
'creationdate' => '0',
|
||||
\ACL::CANADDRECORD => '0',
|
||||
\ACL::CANMODIFRECORD => '0',
|
||||
\ACL::CANDELETERECORD => '0',
|
||||
\ACL::CHGSTATUS => '0',
|
||||
\ACL::IMGTOOLS => '0',
|
||||
\ACL::MANAGE => '0',
|
||||
\ACL::MODIFY_STRUCT => '0',
|
||||
'bas_modify_struct' => '0'
|
||||
\ACL::CANADDRECORD => '0',
|
||||
\ACL::CANMODIFRECORD => '0',
|
||||
\ACL::CANDELETERECORD => '0',
|
||||
\ACL::CHGSTATUS => '0',
|
||||
\ACL::IMGTOOLS => '0',
|
||||
\ACL::COLL_MANAGE => '0',
|
||||
\ACL::COLL_MODIFY_STRUCT => '0',
|
||||
\ACL::BAS_MODIFY_STRUCT => '0'
|
||||
]);
|
||||
|
||||
break 2;
|
||||
@@ -65,10 +65,10 @@ class ACLManipulatorTest extends \PhraseanetTestCase
|
||||
$this->fail("Need at least one collection");
|
||||
}
|
||||
|
||||
$this->assertTrue($acl->has_right_on_sbas($databoxId, 'bas_manage'));
|
||||
$this->assertTrue($acl->has_right_on_sbas($databoxId, 'bas_modify_struct'));
|
||||
$this->assertTrue($acl->has_right_on_sbas($databoxId, 'bas_modif_th'));
|
||||
$this->assertTrue($acl->has_right_on_sbas($databoxId, 'bas_chupub'));
|
||||
$this->assertTrue($acl->has_right_on_sbas($databoxId, \ACL::BAS_MANAGE));
|
||||
$this->assertTrue($acl->has_right_on_sbas($databoxId, \ACL::BAS_MODIFY_STRUCT));
|
||||
$this->assertTrue($acl->has_right_on_sbas($databoxId, \ACL::BAS_MODIF_TH));
|
||||
$this->assertTrue($acl->has_right_on_sbas($databoxId, \ACL::BAS_CHUPUB));
|
||||
|
||||
$this->assertTrue($acl->has_right_on_base($baseId, \ACL::CANPUTINALBUM));
|
||||
$this->assertTrue($acl->has_right_on_base($baseId, \ACL::CANDWNLDHD));
|
||||
@@ -83,8 +83,8 @@ class ACLManipulatorTest extends \PhraseanetTestCase
|
||||
$this->assertTrue($acl->has_right_on_base($baseId, \ACL::CANDELETERECORD));
|
||||
$this->assertTrue($acl->has_right_on_base($baseId, \ACL::CHGSTATUS));
|
||||
$this->assertTrue($acl->has_right_on_base($baseId, \ACL::IMGTOOLS));
|
||||
$this->assertTrue($acl->has_right_on_base($baseId, \ACL::MANAGE));
|
||||
$this->assertTrue($acl->has_right_on_base($baseId, \ACL::MODIFY_STRUCT));
|
||||
$this->assertTrue($acl->has_right_on_base($baseId, \ACL::COLL_MANAGE));
|
||||
$this->assertTrue($acl->has_right_on_base($baseId, \ACL::COLL_MODIFY_STRUCT));
|
||||
|
||||
$this->assertEquals(0, $acl->get_limits($baseId));
|
||||
$this->assertEquals(0, $acl->get_limits($acl->get_mask_xor($baseId)));
|
||||
|
Reference in New Issue
Block a user