• Модуль: disk
  • Путь к файлу: ~/bitrix/modules/disk/lib/rest/service/baseobject.php
  • Класс: BitrixDiskRestServiceBaseObject
  • Вызов: BaseObject::listAllowedOperations
protected function listAllowedOperations($id, $userId)
{
	$object = $this->get($id);

	$rightsManager = Driver::getInstance()->getRightsManager();
	$securityContext = $object->getStorage()->getCurrentUserSecurityContext();
	if (!$object->canChangeRights($securityContext))
	{
		throw new AccessException;
	}

	return array_values($rightsManager->getUserOperationsByObject($object->getId(), $userId));
}