• Модуль: disk
  • Путь к файлу: ~/bitrix/modules/disk/lib/rightsmanager.php
  • Класс: BitrixDiskRightsSetter
  • Вызов: RightsSetter::deleteOnePositive
private function deleteOnePositive(array $right)
{
	foreach($this->getParentRights() as $parentRight)
	{
		if($this->isEqual($parentRight, $right))
		{
			//we don't have to clean negative rights in subtree and recalculate simple right, when in under-tree exists similar right.
			$result = RightTable::delete($right['ID']);
			if($result->isSuccess())
			{
				$this->errorCollection->addFromResult($result);
				return false;
			}
			return true;
		}
	}
	//we don't find right in under-tree.

	/**
	 * 1. Delete all negative rights in sub-tree before positive rights.
	 *  r.NEGATIVE = 1 AND ... r_p.NEGATIVE=0 AND r_p.DEPTH_LEVEL > r.DEPTH_LEVEL
	 * 2. Delete all simple rights in sub-tree before positive rights.
	 */

	return true;
}