- Модуль: webdav
- Путь к файлу: ~/bitrix/modules/webdav/classes/webdavstorage.php
- Класс: CWebDavStorageCore
- Вызов: CWebDavStorageCore::checkRights
protected function checkRights($action, array $element = array())
{
//return true;
//maybe throw expection?
$action = mb_strtolower($action);
if($action == 'create')
{
return $this->init()
->getWebDav()
->checkWebRights('PUT', array(
'arElement' => array(
'is_dir' => false,
'parent_id' => $element['targetDirectoryId'],
),
'action' => 'create',
'create_element_in_section' => true,
), false);
}
elseif($action == 'update' && !empty($element['targetElementId']))
{
return $this
->init()
->getWebDav()
->checkWebRights('PUT', array('arElement' => array(
'not_found' => false,
'item_id' => $element['targetElementId'],
'is_dir' => false,
), 'action' => 'edit'), false);
}
return false;
}