- Модуль: lists
- Путь к файлу: ~/bitrix/modules/lists/lib/security/right.php
- Класс: BitrixListsSecurityRight
- Вызов: Right::checkPermission
public function checkPermission($entityMethod = "")
{
if ($this->listsPermission < 0)
{
switch ($this->listsPermission)
{
case CListPermissions::WRONG_IBLOCK_TYPE:
$this->errorCollection->setError(new Error("Invalid iblock type ID"), self::ACCESS_DENIED
);
break;
case CListPermissions::WRONG_IBLOCK:
$this->errorCollection->setError(new Error("Invalid list ID"), self::ACCESS_DENIED
);
break;
case CListPermissions::LISTS_FOR_SONET_GROUP_DISABLED:
$this->errorCollection->setError(new Error("Lists for this group is disabled", self::ACCESS_DENIED));
break;
default:
$this->errorCollection->setError(new Error("Access denied", self::ACCESS_DENIED));
break;
}
}
if ($entityMethod)
{
if (method_exists($this->entityRight, $entityMethod))
{
if (!$this->entityRight->$entityMethod())
{
$this->errorCollection->setError(new Error("Access denied", self::ACCESS_DENIED));
}
}
else
{
$this->errorCollection->setError(new Error("Access denied", self::ACCESS_DENIED));
}
}
if ($this->hasErrors())
{
return false;
}
else
{
return true;
}
}