1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
$arPerm = Array( "read" => Array( 11, // группа пользователей с id=11 "user_1202", // пользователь с id=1202 ), "write" => Array( 18, ), "create" => Array( author, // CREATED_BY элемента инфоблока ), ); $workflowId = "511cb357458d85.98117228"; $runtime = CBPRuntime::GetRuntime(); $stateService = $runtime->GetService("StateService"); $stateService->SetPermissions( $documentId, $workflowId, $arPerm, ($bRewrite = false) ); |