diff --git a/CHANGELOG.md b/CHANGELOG.md index a8215eb8..36751a6b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,7 @@ - Обращение к несуществующему параметру формы - Необязательный параметр процедуры/функции стоит перед обязательным - Обращение к опциональному параметру формы +- Функция "РольДоступна" ссылается на несуществующие роли #### Запросы diff --git a/bundles/com.e1c.v8codestyle.bsl/META-INF/MANIFEST.MF b/bundles/com.e1c.v8codestyle.bsl/META-INF/MANIFEST.MF index 6ad695c1..61e46907 100644 --- a/bundles/com.e1c.v8codestyle.bsl/META-INF/MANIFEST.MF +++ b/bundles/com.e1c.v8codestyle.bsl/META-INF/MANIFEST.MF @@ -39,6 +39,7 @@ Import-Package: com._1c.g5.v8.bm.core;version="[7.0.0,8.0.0)", com._1c.g5.v8.dt.bsl.util;version="[7.0.0,8.0.0)", com._1c.g5.v8.dt.bsl.validation;version="[16.0.0,17.0.0)", com._1c.g5.v8.dt.common;version="[6.0.0,7.0.0)", + com._1c.g5.v8.dt.core.naming;version="[6.0.0,7.0.0)", com._1c.g5.v8.dt.core.platform;version="[10.0.0,11.0.0)", com._1c.g5.v8.dt.form.model;version="[11.0.0,12.0.0)", com._1c.g5.v8.dt.lcore.ui.editor;version="[2.3.0,3.0.0)", diff --git a/bundles/com.e1c.v8codestyle.bsl/markdown/method-isinrole-role-exist.md b/bundles/com.e1c.v8codestyle.bsl/markdown/method-isinrole-role-exist.md new file mode 100644 index 00000000..22fb6034 --- /dev/null +++ b/bundles/com.e1c.v8codestyle.bsl/markdown/method-isinrole-role-exist.md @@ -0,0 +1,11 @@ +# Referring to a non-existent role + +In the parameter of the function "IsInRole" must existing role to be specified. + +## Noncompliant Code Example + + +## Compliant Solution + + +## See diff --git a/bundles/com.e1c.v8codestyle.bsl/markdown/ru/method-isinrole-role-exist.md b/bundles/com.e1c.v8codestyle.bsl/markdown/ru/method-isinrole-role-exist.md new file mode 100644 index 00000000..0edb6644 --- /dev/null +++ b/bundles/com.e1c.v8codestyle.bsl/markdown/ru/method-isinrole-role-exist.md @@ -0,0 +1,11 @@ +# Обращение к несуществующей роли + +В параметре функции "РольДоступна" должна быть указана существующая роль. + +## Неправильно + + +## Правильно + + +## См. diff --git a/bundles/com.e1c.v8codestyle.bsl/plugin.xml b/bundles/com.e1c.v8codestyle.bsl/plugin.xml index 7d0a4e42..89649747 100644 --- a/bundles/com.e1c.v8codestyle.bsl/plugin.xml +++ b/bundles/com.e1c.v8codestyle.bsl/plugin.xml @@ -347,6 +347,10 @@ category="com.e1c.v8codestyle.bsl" class="com.e1c.v8codestyle.internal.bsl.ExecutableExtensionFactory:com.e1c.v8codestyle.bsl.check.DeprecatedProcedureOutsideDeprecatedRegionCheck"> + + diff --git a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/check/IsInRoleMethodRoleExistCheck.java b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/check/IsInRoleMethodRoleExistCheck.java new file mode 100644 index 00000000..4e0fe216 --- /dev/null +++ b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/check/IsInRoleMethodRoleExistCheck.java @@ -0,0 +1,160 @@ +/******************************************************************************* + * Copyright (C) 2023, 1C-Soft LLC and others. + * + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * 1C-Soft LLC - initial API and implementation + *******************************************************************************/ + +package com.e1c.v8codestyle.bsl.check; + +import static com._1c.g5.v8.dt.bsl.model.BslPackage.Literals.INVOCATION; +import static com._1c.g5.v8.dt.bsl.model.BslPackage.Literals.STRING_LITERAL__LINES; +import static com._1c.g5.v8.dt.metadata.mdclass.MdClassPackage.Literals.CONFIGURATION__ROLES; +import static com._1c.g5.v8.dt.metadata.mdclass.MdClassPackage.Literals.ROLE; + +import java.text.MessageFormat; + +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.emf.common.util.EList; +import org.eclipse.xtext.naming.IQualifiedNameConverter; +import org.eclipse.xtext.resource.IEObjectDescription; +import org.eclipse.xtext.scoping.IScope; +import org.eclipse.xtext.scoping.IScopeProvider; + +import com._1c.g5.v8.dt.bsl.model.Expression; +import com._1c.g5.v8.dt.bsl.model.Invocation; +import com._1c.g5.v8.dt.bsl.model.StaticFeatureAccess; +import com._1c.g5.v8.dt.bsl.model.StringLiteral; +import com._1c.g5.v8.dt.common.StringUtils; +import com._1c.g5.v8.dt.core.naming.ITopObjectFqnGenerator; +import com.e1c.g5.v8.dt.check.CheckComplexity; +import com.e1c.g5.v8.dt.check.ICheckParameters; +import com.e1c.g5.v8.dt.check.components.BasicCheck; +import com.e1c.g5.v8.dt.check.settings.IssueSeverity; +import com.e1c.g5.v8.dt.check.settings.IssueType; +import com.e1c.v8codestyle.check.CommonSenseCheckExtension; +import com.e1c.v8codestyle.internal.bsl.BslPlugin; +import com.google.inject.Inject; + +/** + * Check the method IsInRole, that first param contains exists roles. + * @author Vadim Goncharov + */ +public class IsInRoleMethodRoleExistCheck + extends BasicCheck +{ + + private static final String CHECK_ID = "method-isinrole-role-exist"; //$NON-NLS-1$ + + private static final String METHOD_ISINROLE_NAME = "IsInRole"; //$NON-NLS-1$ + + private static final String METHOD_ISINROLE_NAME_RU = "РольДоступна"; //$NON-NLS-1$ + + private final IScopeProvider scopeProvider; + + private final IQualifiedNameConverter qualifiedNameConverter; + + private final ITopObjectFqnGenerator topObjectFqnGenerator; + + /** + * Instantiates a new invocation role check access exist role check. + * + * @param scopeProvider the scope provider + * @param qualifiedNameConverter the qualified name converter + * @param topObjectFqnGenerator the top object fqn generator + */ + @Inject + public IsInRoleMethodRoleExistCheck(IScopeProvider scopeProvider, IQualifiedNameConverter qualifiedNameConverter, + ITopObjectFqnGenerator topObjectFqnGenerator) + { + super(); + this.scopeProvider = scopeProvider; + this.qualifiedNameConverter = qualifiedNameConverter; + this.topObjectFqnGenerator = topObjectFqnGenerator; + } + + @Override + public String getCheckId() + { + return CHECK_ID; + } + + @Override + protected void configureCheck(CheckConfigurer builder) + { + builder.title(Messages.IsInRoleMethodRoleExistCheck_title) + .description(Messages.IsInRoleMethodRoleExistCheck_description) + .complexity(CheckComplexity.NORMAL) + .severity(IssueSeverity.MAJOR) + .issueType(IssueType.WARNING) + .extension(new CommonSenseCheckExtension(getCheckId(), BslPlugin.PLUGIN_ID)) + .module() + .checkedObjectType(INVOCATION); + } + + @Override + protected void check(Object object, ResultAcceptor resultAcceptor, ICheckParameters parameters, + IProgressMonitor monitor) + { + + Invocation inv = (Invocation)object; + if (monitor.isCanceled() || !isValidInvocation(inv)) + { + return; + } + + EList params = inv.getParams(); + if (monitor.isCanceled() || params.isEmpty() || !(params.get(0) instanceof StringLiteral)) + { + return; + } + + StringLiteral literal = (StringLiteral)params.get(0); + String roleName = literal.lines(true).get(0); + + if (StringUtils.isEmpty(roleName)) + { + return; + } + + IEObjectDescription roleDesc = getRoleDescFromScope(inv, roleName); + if (!monitor.isCanceled() && roleDesc == null) + { + String message = MessageFormat + .format(Messages.IsInRoleMethodRoleExistCheck_Role_named_not_exists_in_configuration, roleName); + resultAcceptor.addIssue(message, literal, STRING_LITERAL__LINES); + } + + } + + private boolean isValidInvocation(Invocation invocation) + { + + if (invocation.getMethodAccess() instanceof StaticFeatureAccess) + { + StaticFeatureAccess sfa = (StaticFeatureAccess)invocation.getMethodAccess(); + if (sfa.getName().equalsIgnoreCase(METHOD_ISINROLE_NAME) + || sfa.getName().equalsIgnoreCase(METHOD_ISINROLE_NAME_RU)) + { + return true; + } + } + + return false; + + } + + private IEObjectDescription getRoleDescFromScope(Invocation inv, String roleName) + { + IScope scope = scopeProvider.getScope(inv, CONFIGURATION__ROLES); + String fqn = topObjectFqnGenerator.generateStandaloneObjectFqn(ROLE, roleName); + return scope.getSingleElement(qualifiedNameConverter.toQualifiedName(fqn)); + } + +} diff --git a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/check/Messages.java b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/check/Messages.java index 9a39f56d..f7544978 100644 --- a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/check/Messages.java +++ b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/check/Messages.java @@ -440,6 +440,12 @@ final class Messages public static String IsInRoleCheck_Using_IsInRole; + public static String IsInRoleMethodRoleExistCheck_description; + + public static String IsInRoleMethodRoleExistCheck_Role_named_not_exists_in_configuration; + + public static String IsInRoleMethodRoleExistCheck_title; + public static String ModuleUndefinedVariableCheck_Title; public static String ModuleUndefinedVariableCheck_Description; public static String ModuleUndefinedVariable_msg; diff --git a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/check/messages.properties b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/check/messages.properties index 5c5dac8e..0f670fd8 100644 --- a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/check/messages.properties +++ b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/check/messages.properties @@ -216,6 +216,12 @@ IsInRoleCheck_Use_AccessRight_instead_IsInRole = Use the AccessRight() function IsInRoleCheck_Using_IsInRole = Using "IsInRole" method +IsInRoleMethodRoleExistCheck_Role_named_not_exists_in_configuration=Role named {0} not exists in configuration + +IsInRoleMethodRoleExistCheck_description=Referring to a non-existent role + +IsInRoleMethodRoleExistCheck_title=Referring to a non-existent role + LockOutOfTry_Checks_for_init_of_the_data_lock = Checks for initialization of the data lock. If the creation of a lock is found, the call of the Lock() method is checked, and the call must be in a try. LockOutOfTry_Lock_out_of_try = Lock out of Try diff --git a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/check/messages_ru.properties b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/check/messages_ru.properties index 968afd55..fa0c59d9 100644 --- a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/check/messages_ru.properties +++ b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/check/messages_ru.properties @@ -216,6 +216,12 @@ IsInRoleCheck_Use_AccessRight_instead_IsInRole = Используйте функ IsInRoleCheck_Using_IsInRole = Использован не рекомендованный метод "РольДоступна" +IsInRoleMethodRoleExistCheck_Role_named_not_exists_in_configuration = Роль {0} не существует в конфигурации + +IsInRoleMethodRoleExistCheck_description = Обращение к несуществующей роли + +IsInRoleMethodRoleExistCheck_title = Обращение к несуществующей роли + LockOutOfTry_Checks_for_init_of_the_data_lock = Правило проверяет наличие инициализации блокировки данных. В случае если найдено создание блокировки, проверяется вызов метода "Заблокировать()", при этом вызов должен быть в попытке. LockOutOfTry_Lock_out_of_try = Метод Заблокировать() вне блока Попытка-Исключение diff --git a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/internal/bsl/ExternalDependenciesModule.java b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/internal/bsl/ExternalDependenciesModule.java index 38931405..3ed8c9a2 100644 --- a/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/internal/bsl/ExternalDependenciesModule.java +++ b/bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/internal/bsl/ExternalDependenciesModule.java @@ -43,6 +43,7 @@ import com._1c.g5.v8.dt.platform.version.IRuntimeVersionSupport; import com._1c.g5.wiring.AbstractServiceAwareModule; import com.e1c.g5.v8.dt.check.qfix.IFixRepository; import com.e1c.g5.v8.dt.check.settings.ICheckRepository; +import com._1c.g5.v8.dt.core.naming.ITopObjectFqnGenerator; /** * The external dependencies for plugin @@ -67,6 +68,7 @@ class ExternalDependenciesModule bind(IBslPreferences.class).toService(); bind(IQualifiedNameConverter.class).toService(); bind(IBslModuleContextDefService.class).toService(); + bind(ITopObjectFqnGenerator.class).toService(); bind(ICheckRepository.class).toService(); bind(IFixRepository.class).toService(); diff --git a/tests/com.e1c.v8codestyle.bsl.itests/src/com/e1c/v8codestyle/bsl/check/itests/IsInRoleMethodRoleExistCheckTest.java b/tests/com.e1c.v8codestyle.bsl.itests/src/com/e1c/v8codestyle/bsl/check/itests/IsInRoleMethodRoleExistCheckTest.java new file mode 100644 index 00000000..46e10153 --- /dev/null +++ b/tests/com.e1c.v8codestyle.bsl.itests/src/com/e1c/v8codestyle/bsl/check/itests/IsInRoleMethodRoleExistCheckTest.java @@ -0,0 +1,74 @@ +/******************************************************************************* + * Copyright (C) 2023, 1C-Soft LLC and others. + * + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * 1C-Soft LLC - initial API and implementation + *******************************************************************************/ + +package com.e1c.v8codestyle.bsl.check.itests; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; + +import java.util.List; +import java.util.stream.Collectors; + +import org.eclipse.core.runtime.Path; +import org.junit.Test; + +import com._1c.g5.v8.dt.validation.marker.IExtraInfoKeys; +import com._1c.g5.v8.dt.validation.marker.Marker; +import com.e1c.v8codestyle.bsl.check.IsInRoleMethodRoleExistCheck; + +/** + * The test for {@link IsInRoleMethodRoleExistCheck} class. + * @author Vadim Goncharov + */ +public class IsInRoleMethodRoleExistCheckTest + extends AbstractSingleModuleTestBase +{ + + private static final String PROJECT_NAME = "IsInRoleMethodRoleExist"; //$NON-NLS-1$ + + private static final String COMMON_MODULE_FILE_NAME = "/src/CommonModules/RolesCommonModule/Module.bsl"; //$NON-NLS-1$ + + public IsInRoleMethodRoleExistCheckTest() + { + super(IsInRoleMethodRoleExistCheck.class); + } + + @Override + protected String getTestConfigurationName() + { + return PROJECT_NAME; + } + + @Override + protected String getModuleFileName() + { + return COMMON_MODULE_FILE_NAME; + } + + /** + * Test invocation role check access exist role check. + * + * @throws Exception the exception + */ + @Test + public void testIsInRoleMethodRoleExistCheck() throws Exception + { + + List markers = getModuleMarkers(); + assertEquals(2, markers.size()); + + assertEquals("2", markers.get(0).getExtraInfo().get(IExtraInfoKeys.TEXT_EXTRA_INFO_LINE_KEY)); + assertEquals("9", markers.get(1).getExtraInfo().get(IExtraInfoKeys.TEXT_EXTRA_INFO_LINE_KEY)); + } + +} diff --git a/tests/com.e1c.v8codestyle.bsl.itests/workspace/IsInRoleMethodRoleExist/.project b/tests/com.e1c.v8codestyle.bsl.itests/workspace/IsInRoleMethodRoleExist/.project new file mode 100644 index 00000000..4c1ad59a --- /dev/null +++ b/tests/com.e1c.v8codestyle.bsl.itests/workspace/IsInRoleMethodRoleExist/.project @@ -0,0 +1,18 @@ + + + IsInRoleMethodRoleExist + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + + org.eclipse.xtext.ui.shared.xtextNature + com._1c.g5.v8.dt.core.V8ConfigurationNature + + diff --git a/tests/com.e1c.v8codestyle.bsl.itests/workspace/IsInRoleMethodRoleExist/.settings/org.eclipse.core.resources.prefs b/tests/com.e1c.v8codestyle.bsl.itests/workspace/IsInRoleMethodRoleExist/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 00000000..99f26c02 --- /dev/null +++ b/tests/com.e1c.v8codestyle.bsl.itests/workspace/IsInRoleMethodRoleExist/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/tests/com.e1c.v8codestyle.bsl.itests/workspace/IsInRoleMethodRoleExist/DT-INF/PROJECT.PMF b/tests/com.e1c.v8codestyle.bsl.itests/workspace/IsInRoleMethodRoleExist/DT-INF/PROJECT.PMF new file mode 100644 index 00000000..6835f1cd --- /dev/null +++ b/tests/com.e1c.v8codestyle.bsl.itests/workspace/IsInRoleMethodRoleExist/DT-INF/PROJECT.PMF @@ -0,0 +1,2 @@ +Manifest-Version: 1.0 +Runtime-Version: 8.3.19 diff --git a/tests/com.e1c.v8codestyle.bsl.itests/workspace/IsInRoleMethodRoleExist/src/CommonModules/RolesCommonModule/Module.bsl b/tests/com.e1c.v8codestyle.bsl.itests/workspace/IsInRoleMethodRoleExist/src/CommonModules/RolesCommonModule/Module.bsl new file mode 100644 index 00000000..272d4b71 --- /dev/null +++ b/tests/com.e1c.v8codestyle.bsl.itests/workspace/IsInRoleMethodRoleExist/src/CommonModules/RolesCommonModule/Module.bsl @@ -0,0 +1,19 @@ +Procedure TestIsInRole() + If IsInRole("TestRole3") Then + EndIf; + If IsInRole("TestRole1") Then + EndIf; +EndProcedure + +Процедура ТестРольДоступна() + Если РольДоступна("TestRole3") Тогда + КонецЕсли; + Если РольДоступна("TestRole1") Тогда + КонецЕсли; +КонецПроцедуры + +Procedure TestStaff() + If Users.RolesAvailable("TestRole1,TestRole2,TestRole3") Then + Message("Test message"); + EndIf; +EndProcedure diff --git a/tests/com.e1c.v8codestyle.bsl.itests/workspace/IsInRoleMethodRoleExist/src/CommonModules/RolesCommonModule/RolesCommonModule.mdo b/tests/com.e1c.v8codestyle.bsl.itests/workspace/IsInRoleMethodRoleExist/src/CommonModules/RolesCommonModule/RolesCommonModule.mdo new file mode 100644 index 00000000..ac320a0d --- /dev/null +++ b/tests/com.e1c.v8codestyle.bsl.itests/workspace/IsInRoleMethodRoleExist/src/CommonModules/RolesCommonModule/RolesCommonModule.mdo @@ -0,0 +1,9 @@ + + + RolesCommonModule + + en + Roles common module + + true + diff --git a/tests/com.e1c.v8codestyle.bsl.itests/workspace/IsInRoleMethodRoleExist/src/CommonModules/Users/Module.bsl b/tests/com.e1c.v8codestyle.bsl.itests/workspace/IsInRoleMethodRoleExist/src/CommonModules/Users/Module.bsl new file mode 100644 index 00000000..e24f3d9d --- /dev/null +++ b/tests/com.e1c.v8codestyle.bsl.itests/workspace/IsInRoleMethodRoleExist/src/CommonModules/Users/Module.bsl @@ -0,0 +1,8 @@ +Function RolesAvailable(RolesNames, User = Undefined, ForPrivilegedMode = True) Export + //Some checks + Return True; +EndFunction + +Function IsFullUser(User = Undefined) Export + Return True; +EndFunction \ No newline at end of file diff --git a/tests/com.e1c.v8codestyle.bsl.itests/workspace/IsInRoleMethodRoleExist/src/CommonModules/Users/Users.mdo b/tests/com.e1c.v8codestyle.bsl.itests/workspace/IsInRoleMethodRoleExist/src/CommonModules/Users/Users.mdo new file mode 100644 index 00000000..a61c3524 --- /dev/null +++ b/tests/com.e1c.v8codestyle.bsl.itests/workspace/IsInRoleMethodRoleExist/src/CommonModules/Users/Users.mdo @@ -0,0 +1,9 @@ + + + Users + + en + Users + + true + diff --git a/tests/com.e1c.v8codestyle.bsl.itests/workspace/IsInRoleMethodRoleExist/src/Configuration/CommandInterface.cmi b/tests/com.e1c.v8codestyle.bsl.itests/workspace/IsInRoleMethodRoleExist/src/Configuration/CommandInterface.cmi new file mode 100644 index 00000000..0cf6de8a --- /dev/null +++ b/tests/com.e1c.v8codestyle.bsl.itests/workspace/IsInRoleMethodRoleExist/src/Configuration/CommandInterface.cmi @@ -0,0 +1,2 @@ + + diff --git a/tests/com.e1c.v8codestyle.bsl.itests/workspace/IsInRoleMethodRoleExist/src/Configuration/Configuration.mdo b/tests/com.e1c.v8codestyle.bsl.itests/workspace/IsInRoleMethodRoleExist/src/Configuration/Configuration.mdo new file mode 100644 index 00000000..7ef2b01c --- /dev/null +++ b/tests/com.e1c.v8codestyle.bsl.itests/workspace/IsInRoleMethodRoleExist/src/Configuration/Configuration.mdo @@ -0,0 +1,44 @@ + + + IsInRoleMethodRoleExist + + en + IsInRoleMethodRoleExistCheck + + + + + + + + + 8.3.19 + ManagedApplication + PersonalComputer + + + true + + + OSBackup + true + + + Language.English + Managed + NotAutoFree + DontUse + DontUse + 8.3.19 + + English + + en + English + + en + + Role.TestRole1 + CommonModule.RolesCommonModule + CommonModule.Users + diff --git a/tests/com.e1c.v8codestyle.bsl.itests/workspace/IsInRoleMethodRoleExist/src/Configuration/MainSectionCommandInterface.cmi b/tests/com.e1c.v8codestyle.bsl.itests/workspace/IsInRoleMethodRoleExist/src/Configuration/MainSectionCommandInterface.cmi new file mode 100644 index 00000000..0cf6de8a --- /dev/null +++ b/tests/com.e1c.v8codestyle.bsl.itests/workspace/IsInRoleMethodRoleExist/src/Configuration/MainSectionCommandInterface.cmi @@ -0,0 +1,2 @@ + + diff --git a/tests/com.e1c.v8codestyle.bsl.itests/workspace/IsInRoleMethodRoleExist/src/Roles/TestRole1/Rights.rights b/tests/com.e1c.v8codestyle.bsl.itests/workspace/IsInRoleMethodRoleExist/src/Roles/TestRole1/Rights.rights new file mode 100644 index 00000000..67fd5321 --- /dev/null +++ b/tests/com.e1c.v8codestyle.bsl.itests/workspace/IsInRoleMethodRoleExist/src/Roles/TestRole1/Rights.rights @@ -0,0 +1,45 @@ + + + false + true + false + + Configuration.IsInRoleMethodRoleExist + + SaveUserData + true + + + ThinClient + true + + + WebClient + true + + + MainWindowModeEmbeddedWorkplace + true + + + MainWindowModeKiosk + true + + + MainWindowModeNormal + true + + + MainWindowModeFullscreenWorkplace + true + + + MainWindowModeWorkplace + true + + + AnalyticsSystemClient + true + + + diff --git a/tests/com.e1c.v8codestyle.bsl.itests/workspace/IsInRoleMethodRoleExist/src/Roles/TestRole1/TestRole1.mdo b/tests/com.e1c.v8codestyle.bsl.itests/workspace/IsInRoleMethodRoleExist/src/Roles/TestRole1/TestRole1.mdo new file mode 100644 index 00000000..e3f3f8a3 --- /dev/null +++ b/tests/com.e1c.v8codestyle.bsl.itests/workspace/IsInRoleMethodRoleExist/src/Roles/TestRole1/TestRole1.mdo @@ -0,0 +1,8 @@ + + + TestRole1 + + en + Test role1 + +