From e5383da771a88a28d0990e50dbd7d75b216331b6 Mon Sep 17 00:00:00 2001 From: IvanSergeev Date: Fri, 20 Mar 2026 16:30:25 +0400 Subject: [PATCH] add md --- .../markdown/common-module-server-call.md | 15 +++++++++++++++ .../markdown/ru/common-module-server-call.md | 17 +++++++++++++++++ .../bsl/check/CommonModuleServerCallCheck.java | 6 +++--- 3 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 bundles/com.e1c.v8codestyle.bsl/markdown/common-module-server-call.md create mode 100644 bundles/com.e1c.v8codestyle.bsl/markdown/ru/common-module-server-call.md diff --git a/bundles/com.e1c.v8codestyle.bsl/markdown/common-module-server-call.md b/bundles/com.e1c.v8codestyle.bsl/markdown/common-module-server-call.md new file mode 100644 index 00000000..765ca1dd --- /dev/null +++ b/bundles/com.e1c.v8codestyle.bsl/markdown/common-module-server-call.md @@ -0,0 +1,15 @@ +# Restriction on setting the "Server Call" flag for common modules + +Don't force the Call Server checkbox on all common modules with the Server flag. +Such shared modules should contain only those procedures and functions that are truly intended to be called from +client code and guarantee the execution of only those actions (and the transfer of only those data to the client) +that the user is authorized to perform while working in the program. For example, a server function implementing +a calculation algorithm should transfer the final result of that calculation to the client, but not the initial +(or intermediate) data for the calculation, which may not be accessible to the current user. + +## Noncompliant Code Example + +## Compliant Solution + +## See +[Restrictions on the use of Run and Eval on the server]https://its.1c.ru/db/v8std#content:679:hdoc \ No newline at end of file diff --git a/bundles/com.e1c.v8codestyle.bsl/markdown/ru/common-module-server-call.md b/bundles/com.e1c.v8codestyle.bsl/markdown/ru/common-module-server-call.md new file mode 100644 index 00000000..670a17ec --- /dev/null +++ b/bundles/com.e1c.v8codestyle.bsl/markdown/ru/common-module-server-call.md @@ -0,0 +1,17 @@ +#Ограничение на установку признака «Вызов сервера» у общих модулей + +Не следует всем общим модулям с признаком Сервер принудительно устанавливать флажок Вызов сервера. + В таких общих модулях следует размещать только те процедуры и функции, которые действительно предназначены для + вызова из клиентского кода и гарантируют выполнение только тех действий + (и передачи только тех данных на сторону клиента), которые разрешены пользователю при его работе в программе. + Например, серверная функция, реализующая некоторый алгоритм расчета, должна передавать на сторону клиента + окончательный результат этого расчета, но не исходные (или промежуточные) данные для расчета, которые сами по + себе могут быть недоступны текущему пользователю. + + +## Неправильно + +## Правильно + +## See +[Ограничение на установку признака «Вызов сервера» у общих модулей]https://its.1c.ru/db/v8std#content:679:hdoc \ No newline at end of file diff --git a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/check/CommonModuleServerCallCheck.java b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/check/CommonModuleServerCallCheck.java index b00c8120..1ecb46e9 100644 --- a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/check/CommonModuleServerCallCheck.java +++ b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/check/CommonModuleServerCallCheck.java @@ -140,7 +140,7 @@ public class CommonModuleServerCallCheck private boolean callInOtherModule(Method object, IProgressMonitor monitor, IBmTransaction bmTransaction) { boolean clientCall = false; - List URIs = new ArrayList<>(); + List uRIs = new ArrayList<>(); IProgressMonitor subMonitor = new NullProgressMonitor() { @Override @@ -197,10 +197,10 @@ public class CommonModuleServerCallCheck referenceFinder.findAllReferences(targetUris, workSpaceResourceAccess, indexData, acceptor, subMonitor); - if (!URIs.isEmpty()) + if (!uRIs.isEmpty()) { List checkClientCall = new ArrayList<>(); - for (URI uri : URIs) + for (URI uri : uRIs) { EObject obj = bmTransaction.getExternalObjectByUri(uri); Method method = EcoreUtil2.getContainerOfType(obj, Method.class);