Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
WorkflowAccessService.php
1<?php
2
4
9
11{
12 private const PREFIX_LOC_ID = 'BIZPROC_LIB_API_WORKFLOW_ACCESS_SERVICE_';
13 private const RIGHTS_ERROR = 'START_WORKFLOW_RIGHTS_ERROR';
14
16 {
17 $hasAccess =
18 \CBPDocument::canUserOperateDocument(
19 \CBPCanUserOperateOperation::StartWorkflow,
20 $request->userId,
21 $request->complexDocumentId,
22 $request->parameters,
23 )
24 ;
25
26 $response = new CheckAccessResponse();
27 if (!$hasAccess)
28 {
29 $response->addError(new Error(Loc::getMessage(static::PREFIX_LOC_ID . static::RIGHTS_ERROR)));
30 }
31
32 return $response;
33 }
34}
checkStartWorkflow(CheckStartWorkflowRequest $request)
static getMessage($code, $replace=null, $language=null)
Definition loc.php:29