本文整理汇总了PHP中ACL::set_masks_on_base方法的典型用法代码示例。如果您正苦于以下问题:PHP ACL::set_masks_on_base方法的具体用法?PHP ACL::set_masks_on_base怎么用?PHP ACL::set_masks_on_base使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ACL
的用法示例。
在下文中一共展示了ACL::set_masks_on_base方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testHasAccesToRecordStatus
public function testHasAccesToRecordStatus()
{
self::$DI['record_1']->set_binary_status(str_repeat('0', 32));
self::$object->set_masks_on_base(self::$DI['record_1']->get_base_id(), '10000', '10000', '0', '0');
self::$DI['record_1']->set_binary_status('10000');
$this->assertFalse(self::$object->has_status_access_to_record(self::$DI['record_1']));
self::$DI['record_1']->set_binary_status('00000');
$this->assertTrue(self::$object->has_status_access_to_record(self::$DI['record_1']));
self::$object->set_masks_on_base(self::$DI['record_1']->get_base_id(), '10000', '10000', '10000', '10000');
$this->assertFalse(self::$object->has_status_access_to_record(self::$DI['record_1']));
self::$DI['record_1']->set_binary_status('10000');
$this->assertTrue(self::$object->has_status_access_to_record(self::$DI['record_1']));
self::$object->set_masks_on_base(self::$DI['record_1']->get_base_id(), '0', '0', '0', '0');
$this->assertTrue(self::$object->has_status_access_to_record(self::$DI['record_1']));
self::$DI['record_1']->set_binary_status(str_repeat('0', 32));
$this->assertTrue(self::$object->has_status_access_to_record(self::$DI['record_1']));
}
示例2: doResetRightsOnCollection
/**
* Resets admin rights on a collection.
*
* @param \ACL $acl
* @param \collection $collection
*/
private function doResetRightsOnCollection(\ACL $acl, \collection $collection)
{
$baseId = $collection->get_base_id();
$acl->set_limits($baseId, false);
$acl->remove_quotas_on_base($baseId);
$acl->set_masks_on_base($baseId, '0', '0', '0', '0');
$acl->update_rights_to_base($baseId, ['canputinalbum' => '1', 'candwnldhd' => '1', 'candwnldsubdef' => '1', 'nowatermark' => '1', 'candwnldpreview' => '1', 'cancmd' => '1', 'canadmin' => '1', 'canreport' => '1', 'canpush' => '1', 'creationdate' => '1', 'canaddrecord' => '1', 'canmodifrecord' => '1', 'candeleterecord' => '1', 'chgstatus' => '1', 'imgtools' => '1', 'manage' => '1', 'modify_struct' => '1', 'bas_modify_struct' => '1']);
}