• Модуль: disk
  • Путь к файлу: ~/bitrix/modules/disk/lib/controller/documentservice.php
  • Класс: BitrixDiskControllerDocumentService
  • Вызов: DocumentService::configureActions
public function configureActions()
{
	return [
		'viewDocument' => [
			'+prefilters' => [
				(new DocumentSessionCheck())
					->enableStrictCheckRight()
				,
				new HttpMethod([HttpMethod::METHOD_GET]),
			],
			'-prefilters' => [Csrf::class],
		],
		'restoreDocumentInteraction' => [
			'+prefilters' => [
				(new DocumentSessionCheck())
					->enableStrictCheckRight()
					->enableHashCheck(function(){
						return Context::getCurrent()->getRequest()->get('documentSessionHash');
					})
				,
				new HttpMethod([HttpMethod::METHOD_GET]),
			],
			'-prefilters' => [Csrf::class],
		],
		'downloadDocument' => [
			'+prefilters' => [
				(new DocumentSessionCheck())
					->enableStrictCheckRight()
					->enableHashCheck(function(){
						return Context::getCurrent()->getRequest()->get('documentSessionHash');
					})
				,
				new HttpMethod([HttpMethod::METHOD_GET]),
				new CloseSession(),
			],
			'-prefilters' => [Csrf::class],
		],
		'goToEditOrPreview' => ['-prefilters' => [Csrf::class]],
		'goToPreview' => ['-prefilters' => [Csrf::class]],
		'goToEdit' => ['-prefilters' => [Csrf::class]],
		'goToCreate' => ['-prefilters' => [Csrf::class]],
		'love' => ['prefilters' => [
			new HttpMethod([HttpMethod::METHOD_GET]),
			new CloseSession(),
		]],
	];
}