You've already forked v8-code-style
mirror of
https://github.com/1C-Company/v8-code-style.git
synced 2025-07-17 13:07:50 +02:00
committed by
GitHub
parent
09d06103b4
commit
91f07cf802
7
bundles/com.e1c.v8codestyle.right/.classpath
Normal file
7
bundles/com.e1c.v8codestyle.right/.classpath
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
28
bundles/com.e1c.v8codestyle.right/.project
Normal file
28
bundles/com.e1c.v8codestyle.right/.project
Normal file
@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>com.e1c.v8codestyle.right</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
@ -0,0 +1,9 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
|
||||
org.eclipse.jdt.core.compiler.compliance=11
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
|
||||
org.eclipse.jdt.core.compiler.release=enabled
|
||||
org.eclipse.jdt.core.compiler.source=11
|
30
bundles/com.e1c.v8codestyle.right/META-INF/MANIFEST.MF
Normal file
30
bundles/com.e1c.v8codestyle.right/META-INF/MANIFEST.MF
Normal file
@ -0,0 +1,30 @@
|
||||
Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: %pluginName
|
||||
Bundle-SymbolicName: com.e1c.v8codestyle.right;singleton:=true
|
||||
Bundle-Version: 0.1.0.qualifier
|
||||
Bundle-Activator: com.e1c.v8codestyle.internal.right.CorePlugin
|
||||
Bundle-Vendor: %providerName
|
||||
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.18.0,4.0.0)",
|
||||
org.eclipse.emf.ecore;bundle-version="[2.22.0,3.0.0)",
|
||||
org.eclipse.xtext;bundle-version="[2.24.0,3.0.0)",
|
||||
org.eclipse.core.resources;bundle-version="[3.14.0,4.0.0)"
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-11
|
||||
Automatic-Module-Name: com.e1c.v8codestyle.right
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-Localization: plugin
|
||||
Import-Package: com._1c.g5.v8.bm.core;version="[7.0.0,8.0.0)",
|
||||
com._1c.g5.v8.bm.integration;version="[9.0.0,10.0.0)",
|
||||
com._1c.g5.v8.dt.common;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.mcore;version="[6.0.0,7.0.0)",
|
||||
com._1c.g5.v8.dt.md;version="[16.0.0,17.0.0)",
|
||||
com._1c.g5.v8.dt.metadata.mdclass;version="[8.0.0,9.0.0)",
|
||||
com._1c.g5.v8.dt.rights.model;version="[4.0.0,5.0.0)",
|
||||
com._1c.g5.v8.dt.rights.model.util;version="[6.0.0,7.0.0)",
|
||||
com._1c.g5.wiring;version="[2.2.0,3.0.0)",
|
||||
com._1c.g5.wiring.binder;version="[1.1.0,2.0.0)",
|
||||
com.e1c.g5.v8.dt.check;version="[1.0.0,2.0.0)",
|
||||
com.e1c.g5.v8.dt.check.components;version="[1.0.0,2.0.0)",
|
||||
com.e1c.g5.v8.dt.check.settings;version="[1.0.0,2.0.0)",
|
||||
com.google.inject;version="[1.3.0,2.0.0)"
|
19
bundles/com.e1c.v8codestyle.right/build.properties
Normal file
19
bundles/com.e1c.v8codestyle.right/build.properties
Normal file
@ -0,0 +1,19 @@
|
||||
###############################################################################
|
||||
# Copyright (C) 2021, 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
|
||||
###############################################################################
|
||||
source.. = src/
|
||||
output.. = bin/
|
||||
bin.includes = META-INF/,\
|
||||
.,\
|
||||
plugin.xml,\
|
||||
plugin.properties,\
|
||||
plugin_ru.properties
|
3
bundles/com.e1c.v8codestyle.right/check.descriptions/.gitignore
vendored
Normal file
3
bundles/com.e1c.v8codestyle.right/check.descriptions/.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
*.html
|
||||
*.css
|
||||
*.js
|
@ -0,0 +1,13 @@
|
||||
# right-interactive-clear-deletion-mark-predefined-data
|
||||
|
||||
|
||||
|
||||
## Noncompliant Code Example
|
||||
|
||||
|
||||
|
||||
## Compliant Solution
|
||||
|
||||
|
||||
## See
|
||||
|
@ -0,0 +1,13 @@
|
||||
# right-interactive-delete-marked-predefined-data
|
||||
|
||||
|
||||
|
||||
## Noncompliant Code Example
|
||||
|
||||
|
||||
|
||||
## Compliant Solution
|
||||
|
||||
|
||||
## See
|
||||
|
@ -0,0 +1,13 @@
|
||||
# right-interactive-delete-predefined-data
|
||||
|
||||
|
||||
|
||||
## Noncompliant Code Example
|
||||
|
||||
|
||||
|
||||
## Compliant Solution
|
||||
|
||||
|
||||
## See
|
||||
|
@ -0,0 +1,13 @@
|
||||
# right-interactive-delete
|
||||
|
||||
|
||||
|
||||
## Noncompliant Code Example
|
||||
|
||||
|
||||
|
||||
## Compliant Solution
|
||||
|
||||
|
||||
## See
|
||||
|
@ -0,0 +1,13 @@
|
||||
# right-interactive-set-deletion-mark-predefined-data
|
||||
|
||||
|
||||
|
||||
## Noncompliant Code Example
|
||||
|
||||
|
||||
|
||||
## Compliant Solution
|
||||
|
||||
|
||||
## See
|
||||
|
@ -0,0 +1,13 @@
|
||||
# role-right-has-rls
|
||||
|
||||
|
||||
|
||||
## Noncompliant Code Example
|
||||
|
||||
|
||||
|
||||
## Compliant Solution
|
||||
|
||||
|
||||
## See
|
||||
|
@ -0,0 +1,10 @@
|
||||
# right-interactive-clear-deletion-mark-predefined-data
|
||||
|
||||
|
||||
|
||||
## Неправильно
|
||||
|
||||
## Правильно
|
||||
|
||||
## См.
|
||||
|
@ -0,0 +1,10 @@
|
||||
# right-interactive-delete-marked-predefined-data
|
||||
|
||||
|
||||
|
||||
## Неправильно
|
||||
|
||||
## Правильно
|
||||
|
||||
## См.
|
||||
|
@ -0,0 +1,10 @@
|
||||
# right-interactive-delete-predefined-data
|
||||
|
||||
|
||||
|
||||
## Неправильно
|
||||
|
||||
## Правильно
|
||||
|
||||
## См.
|
||||
|
@ -0,0 +1,10 @@
|
||||
# right-interactive-delete
|
||||
|
||||
|
||||
|
||||
## Неправильно
|
||||
|
||||
## Правильно
|
||||
|
||||
## См.
|
||||
|
@ -0,0 +1,10 @@
|
||||
# right-interactive-set-deletion-mark-predefined-data
|
||||
|
||||
|
||||
|
||||
## Неправильно
|
||||
|
||||
## Правильно
|
||||
|
||||
## См.
|
||||
|
@ -0,0 +1,10 @@
|
||||
# role-right-has-rls
|
||||
|
||||
|
||||
|
||||
## Неправильно
|
||||
|
||||
## Правильно
|
||||
|
||||
## См.
|
||||
|
18
bundles/com.e1c.v8codestyle.right/plugin.properties
Normal file
18
bundles/com.e1c.v8codestyle.right/plugin.properties
Normal file
@ -0,0 +1,18 @@
|
||||
###############################################################################
|
||||
# Copyright (C) 2021, 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
|
||||
###############################################################################
|
||||
#Properties file for com.e1c.v8codestyle.right
|
||||
providerName = 1C-Soft LLC
|
||||
pluginName = 1C:Code style V8 Role Rights plugin
|
||||
|
||||
category.right.description = Role rights checks (*.rights files) by standards
|
||||
category.right.title = Role rights checks by standards
|
51
bundles/com.e1c.v8codestyle.right/plugin.xml
Normal file
51
bundles/com.e1c.v8codestyle.right/plugin.xml
Normal file
@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?eclipse version="3.4"?>
|
||||
<!--
|
||||
Copyright (C) 2021, 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
|
||||
-->
|
||||
|
||||
<plugin>
|
||||
<extension
|
||||
point="com.e1c.g5.v8.dt.check.checks">
|
||||
<category
|
||||
category="com.e1c.v8codestyle"
|
||||
description="%category.right.description"
|
||||
id="com.e1c.v8codestyle.right"
|
||||
title="%category.right.title">
|
||||
</category>
|
||||
<check
|
||||
category="com.e1c.v8codestyle.right"
|
||||
class="com.e1c.v8codestyle.internal.right.ExecutableExtensionFactory:com.e1c.v8codestyle.right.check.RightInteracitveDelete">
|
||||
</check>
|
||||
<check
|
||||
category="com.e1c.v8codestyle.right"
|
||||
class="com.e1c.v8codestyle.internal.right.ExecutableExtensionFactory:com.e1c.v8codestyle.right.check.RightInteracitveDeletePredefinedData">
|
||||
</check>
|
||||
<check
|
||||
category="com.e1c.v8codestyle.right"
|
||||
class="com.e1c.v8codestyle.internal.right.ExecutableExtensionFactory:com.e1c.v8codestyle.right.check.RightInteracitveDeleteMarkedPredefinedData">
|
||||
</check>
|
||||
<check
|
||||
category="com.e1c.v8codestyle.right"
|
||||
class="com.e1c.v8codestyle.internal.right.ExecutableExtensionFactory:com.e1c.v8codestyle.right.check.RightInteractiveClearDeletionMarkPredefinedData">
|
||||
</check>
|
||||
<check
|
||||
category="com.e1c.v8codestyle.right"
|
||||
class="com.e1c.v8codestyle.internal.right.ExecutableExtensionFactory:com.e1c.v8codestyle.right.check.RightInteractiveSetDeletionMarkPredefinedData">
|
||||
</check>
|
||||
<check
|
||||
category="com.e1c.v8codestyle.right"
|
||||
class="com.e1c.v8codestyle.internal.right.ExecutableExtensionFactory:com.e1c.v8codestyle.right.check.RoleRightHasRls">
|
||||
</check>
|
||||
</extension>
|
||||
|
||||
</plugin>
|
20
bundles/com.e1c.v8codestyle.right/plugin_ru.properties
Normal file
20
bundles/com.e1c.v8codestyle.right/plugin_ru.properties
Normal file
@ -0,0 +1,20 @@
|
||||
###############################################################################
|
||||
# Copyright (C) 2021, 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
|
||||
###############################################################################
|
||||
#Generated by ResourceBundle Editor (http://essiembre.github.io/eclipse-rbe/)
|
||||
|
||||
category.ritht.description = Проверки Прав ролей (Rights, файлы *.rights) по стандартам
|
||||
category.ritht.title = Проверки Прав ролей по стандартам
|
||||
|
||||
pluginName = 1С:Стандарты разработки V8 Плагин прав ролей
|
||||
|
||||
providerName = ООО "1С-Софт"
|
68
bundles/com.e1c.v8codestyle.right/pom.xml
Normal file
68
bundles/com.e1c.v8codestyle.right/pom.xml
Normal file
@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Copyright (C) 2021, 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
|
||||
-->
|
||||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.e1c.v8codestyle</groupId>
|
||||
<artifactId>bundles</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>com.e1c.v8codestyle.right</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
|
||||
<properties>
|
||||
<!-- base dir of bom module: bom/parent/bundle/this-module -->
|
||||
<markdown.page.generator.html.file.path>${project.parent.parent.parent.basedir}</markdown.page.generator.html.file.path>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>com.ruleoftech</groupId>
|
||||
<artifactId>markdown-page-generator-plugin</artifactId>
|
||||
<configuration>
|
||||
<inputDirectory>${project.basedir}/markdown</inputDirectory>
|
||||
<outputDirectory>${project.basedir}/check.descriptions</outputDirectory>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-resource-files</id>
|
||||
<phase>generate-sources</phase>
|
||||
<configuration>
|
||||
<target>
|
||||
<property name="source" value="${project.basedir}/../../bom"/>
|
||||
<copy toDir="${project.basedir}/check.descriptions/css">
|
||||
<fileset dir="${source}/html/css" />
|
||||
</copy>
|
||||
<copy toDir="${project.basedir}/check.descriptions/js">
|
||||
<fileset dir="${source}/html/js" />
|
||||
</copy>
|
||||
</target>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
@ -0,0 +1,167 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (C) 2021, 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.internal.right;
|
||||
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.core.runtime.Plugin;
|
||||
import org.eclipse.core.runtime.Status;
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
||||
import com.google.inject.Guice;
|
||||
import com.google.inject.Injector;
|
||||
|
||||
/**
|
||||
* Plugin activator. The activator class controls the plugin life cycle.
|
||||
*
|
||||
* @author Dmitriy Marmyshev
|
||||
*/
|
||||
public class CorePlugin
|
||||
extends Plugin
|
||||
{
|
||||
|
||||
public static final String PLUGIN_ID = "com.e1c.v8codestyle.right"; //$NON-NLS-1$
|
||||
|
||||
private static CorePlugin plugin;
|
||||
|
||||
private Injector injector;
|
||||
|
||||
/**
|
||||
* Returns the shared instance
|
||||
*
|
||||
* @return the shared instance
|
||||
*/
|
||||
public static CorePlugin getDefault()
|
||||
{
|
||||
return plugin;
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes a status to the plugin log.
|
||||
*
|
||||
* @param status status to log, cannot be <code>null</code>
|
||||
*/
|
||||
public static void log(IStatus status)
|
||||
{
|
||||
plugin.getLog().log(status);
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes a throwable to the plugin log as error status.
|
||||
*
|
||||
* @param throwable throwable, cannot be <code>null</code>
|
||||
*/
|
||||
public static void logError(Throwable throwable)
|
||||
{
|
||||
log(createErrorStatus(throwable.getMessage(), throwable));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates error status by a given message and cause throwable.
|
||||
*
|
||||
* @param message status message, cannot be <code>null</code>
|
||||
* @param throwable throwable, can be <code>null</code> if not applicable
|
||||
* @return status created error status, never <code>null</code>
|
||||
*/
|
||||
public static IStatus createErrorStatus(String message, Throwable throwable)
|
||||
{
|
||||
return new Status(IStatus.ERROR, PLUGIN_ID, 0, message, throwable);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates warning status by a given message.
|
||||
*
|
||||
* @param message status message, cannot be <code>null</code>
|
||||
* @return status created warning status, never <code>null</code>
|
||||
*/
|
||||
public static IStatus createWarningStatus(String message)
|
||||
{
|
||||
return new Status(IStatus.WARNING, PLUGIN_ID, 0, message, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates warning status by a given message and cause throwable.
|
||||
*
|
||||
* @param message status message, cannot be <code>null</code>
|
||||
* @param throwable throwable, can be <code>null</code> if not applicable
|
||||
* @return status created warning status, never <code>null</code>
|
||||
*/
|
||||
public static IStatus createWarningStatus(final String message, Exception throwable)
|
||||
{
|
||||
return new Status(IStatus.WARNING, PLUGIN_ID, 0, message, throwable);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
|
||||
*/
|
||||
@Override
|
||||
public void start(BundleContext bundleContext) throws Exception
|
||||
{
|
||||
super.start(bundleContext);
|
||||
|
||||
plugin = this;
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
|
||||
*/
|
||||
@Override
|
||||
public void stop(BundleContext bundleContext) throws Exception
|
||||
{
|
||||
plugin = null;
|
||||
injector = null;
|
||||
|
||||
super.stop(bundleContext);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Guice injector for this plugin.
|
||||
*
|
||||
* @return Guice injector for this plugin, never <code>null</code>
|
||||
*/
|
||||
/* package */ Injector getInjector()
|
||||
{
|
||||
Injector localInstance = injector;
|
||||
if (localInstance == null)
|
||||
{
|
||||
synchronized (CorePlugin.class)
|
||||
{
|
||||
localInstance = injector;
|
||||
if (localInstance == null)
|
||||
{
|
||||
localInstance = createInjector();
|
||||
injector = localInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
return localInstance;
|
||||
}
|
||||
|
||||
private Injector createInjector()
|
||||
{
|
||||
try
|
||||
{
|
||||
return Guice.createInjector(new ExternalDependenciesModule(this));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
log(createErrorStatus("Failed to create injector for " //$NON-NLS-1$
|
||||
+ getBundle().getSymbolicName(), e));
|
||||
throw new RuntimeException("Failed to create injector for " //$NON-NLS-1$
|
||||
+ getBundle().getSymbolicName(), e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (C) 2021, 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.internal.right;
|
||||
|
||||
import org.osgi.framework.Bundle;
|
||||
|
||||
import com._1c.g5.wiring.AbstractGuiceAwareExecutableExtensionFactory;
|
||||
import com.google.inject.Injector;
|
||||
|
||||
/**
|
||||
* Guice module aware executable extension factory for plugin.
|
||||
*
|
||||
* @author Dmitriy Marmyshev
|
||||
*/
|
||||
public class ExecutableExtensionFactory
|
||||
extends AbstractGuiceAwareExecutableExtensionFactory
|
||||
{
|
||||
@Override
|
||||
protected Bundle getBundle()
|
||||
{
|
||||
return CorePlugin.getDefault().getBundle();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Injector getInjector()
|
||||
{
|
||||
return CorePlugin.getDefault().getInjector();
|
||||
}
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (C) 2021, 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.internal.right;
|
||||
|
||||
import org.eclipse.core.runtime.Plugin;
|
||||
|
||||
import com._1c.g5.v8.dt.core.platform.IBmModelManager;
|
||||
import com._1c.g5.v8.dt.core.platform.IV8ProjectManager;
|
||||
import com._1c.g5.wiring.AbstractServiceAwareModule;
|
||||
|
||||
/**
|
||||
* External services bindings for plugin.
|
||||
*
|
||||
* @author Dmitriy Marmyshev
|
||||
*
|
||||
*/
|
||||
public class ExternalDependenciesModule
|
||||
extends AbstractServiceAwareModule
|
||||
{
|
||||
|
||||
/**
|
||||
* @param plugin
|
||||
*/
|
||||
public ExternalDependenciesModule(Plugin plugin)
|
||||
{
|
||||
super(plugin);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doConfigure()
|
||||
{
|
||||
bind(IV8ProjectManager.class).toService();
|
||||
bind(IBmModelManager.class).toService();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (C) 2021, 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.right.check;
|
||||
|
||||
import org.eclipse.osgi.util.NLS;
|
||||
|
||||
/**
|
||||
* @author Dmitriy Marmyshev
|
||||
*
|
||||
*/
|
||||
final class Messages
|
||||
extends NLS
|
||||
{
|
||||
private static final String BUNDLE_NAME = "com.e1c.v8codestyle.right.check.messages"; //$NON-NLS-1$
|
||||
public static String RightInteracitveDelete_description;
|
||||
public static String RightInteracitveDelete_title;
|
||||
public static String RightInteracitveDeleteMarkedPredefinedData_description;
|
||||
public static String RightInteracitveDeleteMarkedPredefinedData_title;
|
||||
public static String RightInteracitveDeletePredefinedData_description;
|
||||
public static String RightInteracitveDeletePredefinedData_title;
|
||||
public static String RightInteractiveClearDeletionMarkPredefinedData_description;
|
||||
public static String RightInteractiveClearDeletionMarkPredefinedData_title;
|
||||
public static String RightInteractiveSetDeletionMarkPredefinedData_description;
|
||||
public static String RightInteractiveSetDeletionMarkPredefinedData_title;
|
||||
public static String RoleRightHasRls_description;
|
||||
public static String RoleRightHasRls_Exclude_Right_Object_name_pattern;
|
||||
public static String RoleRightHasRls_Role_name_pattern;
|
||||
public static String RoleRightHasRls_Role_Right__0__for__1__has_RLS;
|
||||
public static String RoleRightHasRls_title;
|
||||
public static String RoleRightSetCheck_Exclude_Right_Object_name_pattern;
|
||||
public static String RoleRightSetCheck_Exclude_Role_name_pattern;
|
||||
public static String RoleRightSetCheck_Role_right__0__set_for__1;
|
||||
static
|
||||
{
|
||||
// initialize resource bundle
|
||||
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
|
||||
}
|
||||
|
||||
private Messages()
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,57 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (C) 2021, 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.right.check;
|
||||
|
||||
import com._1c.g5.v8.dt.core.platform.IBmModelManager;
|
||||
import com._1c.g5.v8.dt.core.platform.IV8ProjectManager;
|
||||
import com._1c.g5.v8.dt.rights.model.util.RightName;
|
||||
import com.google.inject.Inject;
|
||||
|
||||
/**
|
||||
* Checks that role has forbidden right: {@code INTERACTIVE_DELETE} for any objects.
|
||||
*
|
||||
* @author Dmitriy Marmyshev
|
||||
*
|
||||
*/
|
||||
public class RightInteracitveDelete
|
||||
extends RoleRightSetCheck
|
||||
{
|
||||
|
||||
public static final String CHECK_ID = "right-interactive-delete"; //$NON-NLS-1$
|
||||
|
||||
@Inject
|
||||
public RightInteracitveDelete(IV8ProjectManager v8ProjectManager, IBmModelManager bmModelManager)
|
||||
{
|
||||
super(v8ProjectManager, bmModelManager);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCheckId()
|
||||
{
|
||||
return CHECK_ID;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configureCheck(CheckConfigurer builder)
|
||||
{
|
||||
super.configureCheck(builder);
|
||||
builder.title(Messages.RightInteracitveDelete_title).description(Messages.RightInteracitveDelete_description);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected RightName getRightName()
|
||||
{
|
||||
return RightName.INTERACTIVE_DELETE;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (C) 2021, 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.right.check;
|
||||
|
||||
import com._1c.g5.v8.dt.core.platform.IBmModelManager;
|
||||
import com._1c.g5.v8.dt.core.platform.IV8ProjectManager;
|
||||
import com._1c.g5.v8.dt.rights.model.util.RightName;
|
||||
import com.google.inject.Inject;
|
||||
|
||||
/**
|
||||
* Checks that role has forbidden right: {@code INTERACTIVE_DELETE_MARKED_PREDEFINED_DATA} for any objects.
|
||||
*
|
||||
* @author Dmitriy Marmyshev
|
||||
*
|
||||
*/
|
||||
public class RightInteracitveDeleteMarkedPredefinedData
|
||||
extends RoleRightSetCheck
|
||||
{
|
||||
|
||||
public static final String CHECK_ID = "right-interactive-delete-marked-predefined-data"; //$NON-NLS-1$
|
||||
|
||||
@Inject
|
||||
public RightInteracitveDeleteMarkedPredefinedData(IV8ProjectManager v8ProjectManager,
|
||||
IBmModelManager bmModelManager)
|
||||
{
|
||||
super(v8ProjectManager, bmModelManager);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCheckId()
|
||||
{
|
||||
return CHECK_ID;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configureCheck(CheckConfigurer builder)
|
||||
{
|
||||
super.configureCheck(builder);
|
||||
builder.title(Messages.RightInteracitveDeleteMarkedPredefinedData_title)
|
||||
.description(Messages.RightInteracitveDeleteMarkedPredefinedData_description);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected RightName getRightName()
|
||||
{
|
||||
return RightName.INTERACTIVE_DELETE_MARKED_PREDEFINED_DATA;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,58 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (C) 2021, 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.right.check;
|
||||
|
||||
import com._1c.g5.v8.dt.core.platform.IBmModelManager;
|
||||
import com._1c.g5.v8.dt.core.platform.IV8ProjectManager;
|
||||
import com._1c.g5.v8.dt.rights.model.util.RightName;
|
||||
import com.google.inject.Inject;
|
||||
|
||||
/**
|
||||
* Checks that role has forbidden right: {@code INTERACTIVE_DELETE_PREDEFINED_DATA} for any objects.
|
||||
*
|
||||
* @author Dmitriy Marmyshev
|
||||
*
|
||||
*/
|
||||
public class RightInteracitveDeletePredefinedData
|
||||
extends RoleRightSetCheck
|
||||
{
|
||||
|
||||
public static final String CHECK_ID = "right-interactive-delete-predefined-data"; //$NON-NLS-1$
|
||||
|
||||
@Inject
|
||||
public RightInteracitveDeletePredefinedData(IV8ProjectManager v8ProjectManager, IBmModelManager bmModelManager)
|
||||
{
|
||||
super(v8ProjectManager, bmModelManager);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCheckId()
|
||||
{
|
||||
return CHECK_ID;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configureCheck(CheckConfigurer builder)
|
||||
{
|
||||
super.configureCheck(builder);
|
||||
builder.title(Messages.RightInteracitveDeletePredefinedData_title)
|
||||
.description(Messages.RightInteracitveDeletePredefinedData_description);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected RightName getRightName()
|
||||
{
|
||||
return RightName.INTERACTIVE_DELETE_PREDEFINED_DATA;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (C) 2021, 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.right.check;
|
||||
|
||||
import com._1c.g5.v8.dt.core.platform.IBmModelManager;
|
||||
import com._1c.g5.v8.dt.core.platform.IV8ProjectManager;
|
||||
import com._1c.g5.v8.dt.rights.model.util.RightName;
|
||||
import com.google.inject.Inject;
|
||||
|
||||
/**
|
||||
* Checks that role has forbidden right: {@code INTERACTIVE_CLEAR_DELETION_MARK_PREDEFINED_DATA} for any objects.
|
||||
*
|
||||
* @author Dmitriy Marmyshev
|
||||
*
|
||||
*/
|
||||
public class RightInteractiveClearDeletionMarkPredefinedData
|
||||
extends RoleRightSetCheck
|
||||
{
|
||||
|
||||
public static final String CHECK_ID = "right-interactive-clear-deletion-mark-predefined-data"; //$NON-NLS-1$
|
||||
|
||||
@Inject
|
||||
public RightInteractiveClearDeletionMarkPredefinedData(IV8ProjectManager v8ProjectManager,
|
||||
IBmModelManager bmModelManager)
|
||||
{
|
||||
super(v8ProjectManager, bmModelManager);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCheckId()
|
||||
{
|
||||
return CHECK_ID;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configureCheck(CheckConfigurer builder)
|
||||
{
|
||||
super.configureCheck(builder);
|
||||
builder.title(Messages.RightInteractiveClearDeletionMarkPredefinedData_title)
|
||||
.description(Messages.RightInteractiveClearDeletionMarkPredefinedData_description);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected RightName getRightName()
|
||||
{
|
||||
return RightName.INTERACTIVE_CLEAR_DELETION_MARK_PREDEFINED_DATA;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (C) 2021, 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.right.check;
|
||||
|
||||
import com._1c.g5.v8.dt.core.platform.IBmModelManager;
|
||||
import com._1c.g5.v8.dt.core.platform.IV8ProjectManager;
|
||||
import com._1c.g5.v8.dt.rights.model.util.RightName;
|
||||
import com.google.inject.Inject;
|
||||
|
||||
/**
|
||||
* Checks that role has forbidden right: {@code INTERACTIVE_SET_DELETION_MARK_PREDEFINED_DATA} for any objects.
|
||||
*
|
||||
* @author Dmitriy Marmyshev
|
||||
*
|
||||
*/
|
||||
public class RightInteractiveSetDeletionMarkPredefinedData
|
||||
extends RoleRightSetCheck
|
||||
{
|
||||
|
||||
public static final String CHECK_ID = "right-interactive-set-deletion-mark-predefined-data"; //$NON-NLS-1$
|
||||
|
||||
@Inject
|
||||
public RightInteractiveSetDeletionMarkPredefinedData(IV8ProjectManager v8ProjectManager,
|
||||
IBmModelManager bmModelManager)
|
||||
{
|
||||
super(v8ProjectManager, bmModelManager);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCheckId()
|
||||
{
|
||||
return CHECK_ID;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configureCheck(CheckConfigurer builder)
|
||||
{
|
||||
super.configureCheck(builder);
|
||||
builder.title(Messages.RightInteractiveSetDeletionMarkPredefinedData_title)
|
||||
.description(Messages.RightInteractiveSetDeletionMarkPredefinedData_description);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected RightName getRightName()
|
||||
{
|
||||
return RightName.INTERACTIVE_SET_DELETION_MARK_PREDEFINED_DATA;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,168 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (C) 2021, 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.right.check;
|
||||
|
||||
import static com._1c.g5.v8.dt.rights.model.RightsPackage.Literals.RLS;
|
||||
import static com._1c.g5.v8.dt.rights.model.RightsPackage.Literals.RLS__CONDITION;
|
||||
import static com._1c.g5.v8.dt.rights.model.RightsPackage.Literals.ROLE_DESCRIPTION;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
|
||||
import org.eclipse.core.runtime.Assert;
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.xtext.EcoreUtil2;
|
||||
|
||||
import com._1c.g5.v8.bm.integration.IBmModel;
|
||||
import com._1c.g5.v8.dt.core.platform.IBmModelManager;
|
||||
import com._1c.g5.v8.dt.core.platform.IV8Project;
|
||||
import com._1c.g5.v8.dt.core.platform.IV8ProjectManager;
|
||||
import com._1c.g5.v8.dt.md.MdUtil;
|
||||
import com._1c.g5.v8.dt.metadata.mdclass.MdObject;
|
||||
import com._1c.g5.v8.dt.metadata.mdclass.Role;
|
||||
import com._1c.g5.v8.dt.metadata.mdclass.ScriptVariant;
|
||||
import com._1c.g5.v8.dt.rights.model.ObjectRight;
|
||||
import com._1c.g5.v8.dt.rights.model.ObjectRights;
|
||||
import com._1c.g5.v8.dt.rights.model.Rls;
|
||||
import com._1c.g5.v8.dt.rights.model.RoleDescription;
|
||||
import com._1c.g5.v8.dt.rights.model.util.RightsModelUtil;
|
||||
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.google.inject.Inject;
|
||||
|
||||
/**
|
||||
* Checks that role has right restriction (RLS) for roles with full-access level.
|
||||
*
|
||||
* @author Dmitriy Marmyshev
|
||||
*/
|
||||
public class RoleRightHasRls
|
||||
extends BasicCheck
|
||||
{
|
||||
|
||||
private static final String CHECK_ID = "role-right-has-rls"; //$NON-NLS-1$
|
||||
|
||||
private static final String ROLE_NAME_PATTERN_PARAMETER_NAME = "roleNamePattern"; //$NON-NLS-1$
|
||||
|
||||
private static final String ROLE_NAME_PATTERN_PARAMETER_DEFAULT =
|
||||
"ПолныеПрава|АдминистраторСистемы|FullAccess|SystemAdministrator"; //$NON-NLS-1$
|
||||
|
||||
public static final String EXCLUDE_OBJECT_NAME_PATTERN_PARAMETER_NAME = "excludeObjectNamePattern"; //$NON-NLS-1$
|
||||
|
||||
private final IV8ProjectManager v8ProjectManager;
|
||||
|
||||
private final IBmModelManager bmModelManager;
|
||||
|
||||
/**
|
||||
* Creates new instance of check that find RLS set common roles.
|
||||
*
|
||||
* @param v8ProjectManager the V8 project manager, cannot be {@code null}.
|
||||
* @param bmModelManager the BM model manager, cannot be {@code null}.
|
||||
*/
|
||||
@Inject
|
||||
public RoleRightHasRls(IV8ProjectManager v8ProjectManager, IBmModelManager bmModelManager)
|
||||
{
|
||||
this.v8ProjectManager = v8ProjectManager;
|
||||
this.bmModelManager = bmModelManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCheckId()
|
||||
{
|
||||
return CHECK_ID;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void check(Object object, ResultAcceptor resultAceptor, ICheckParameters parameters,
|
||||
IProgressMonitor monitor)
|
||||
{
|
||||
Rls rls = (Rls)object;
|
||||
|
||||
if (rls.getCondition() != null && !rls.getCondition().isBlank())
|
||||
{
|
||||
String roleNamePattern = parameters.getString(ROLE_NAME_PATTERN_PARAMETER_NAME);
|
||||
if (roleNamePattern != null && !roleNamePattern.isBlank())
|
||||
{
|
||||
IBmModel model = bmModelManager.getModel(rls);
|
||||
RoleDescription description = EcoreUtil2.getContainerOfType(rls, RoleDescription.class);
|
||||
Role role = RightsModelUtil.getOwner(description, model);
|
||||
if (role == null || !role.getName().matches(roleNamePattern))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
ObjectRight right = EcoreUtil2.getContainerOfType(rls, ObjectRight.class);
|
||||
ObjectRights rights = EcoreUtil2.getContainerOfType(right, ObjectRights.class);
|
||||
MdObject mdObject = rights.getObject() instanceof MdObject ? (MdObject)rights.getObject() : null;
|
||||
|
||||
String excludeObjectNamePattern = parameters.getString(EXCLUDE_OBJECT_NAME_PATTERN_PARAMETER_NAME);
|
||||
if (excludeObjectNamePattern != null && !excludeObjectNamePattern.isBlank() && mdObject != null
|
||||
&& mdObject.getName().matches(excludeObjectNamePattern))
|
||||
{
|
||||
return;
|
||||
}
|
||||
IV8Project project = v8ProjectManager.getProject(rls);
|
||||
|
||||
String rightName = getRightName(right, project);
|
||||
String mdName = getMdObjectName(mdObject, project);
|
||||
|
||||
String message =
|
||||
MessageFormat.format(Messages.RoleRightHasRls_Role_Right__0__for__1__has_RLS, rightName, mdName);
|
||||
resultAceptor.addIssue(message, RLS__CONDITION);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configureCheck(CheckConfigurer builder)
|
||||
{
|
||||
builder.title(Messages.RoleRightHasRls_title)
|
||||
.description(Messages.RoleRightHasRls_description)
|
||||
.complexity(CheckComplexity.NORMAL)
|
||||
.severity(IssueSeverity.MAJOR)
|
||||
.issueType(IssueType.WARNING)
|
||||
.topObject(ROLE_DESCRIPTION)
|
||||
.containment(RLS)
|
||||
.features(RLS__CONDITION)
|
||||
.parameter(ROLE_NAME_PATTERN_PARAMETER_NAME, String.class, ROLE_NAME_PATTERN_PARAMETER_DEFAULT,
|
||||
Messages.RoleRightHasRls_Role_name_pattern)
|
||||
.parameter(EXCLUDE_OBJECT_NAME_PATTERN_PARAMETER_NAME, String.class, "", //$NON-NLS-1$
|
||||
Messages.RoleRightHasRls_Exclude_Right_Object_name_pattern);
|
||||
}
|
||||
|
||||
private String getRightName(ObjectRight right, IV8Project project)
|
||||
{
|
||||
Assert.isNotNull(project);
|
||||
if (project.getScriptVariant() == ScriptVariant.RUSSIAN)
|
||||
{
|
||||
return right.getRight().getNameRu();
|
||||
}
|
||||
return right.getRight().getName();
|
||||
}
|
||||
|
||||
private String getMdObjectName(MdObject mdObject, IV8Project project)
|
||||
{
|
||||
Assert.isNotNull(project);
|
||||
if (mdObject == null)
|
||||
return "Unknown"; //$NON-NLS-1$
|
||||
|
||||
if (project.getScriptVariant() == ScriptVariant.RUSSIAN)
|
||||
{
|
||||
return MdUtil.getFullyQualifiedNameRu(mdObject).toString();
|
||||
}
|
||||
return MdUtil.getFullyQualifiedName(mdObject).toString();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,198 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (C) 2021, 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.right.check;
|
||||
|
||||
import static com._1c.g5.v8.dt.rights.model.RightsPackage.Literals.OBJECT_RIGHT;
|
||||
import static com._1c.g5.v8.dt.rights.model.RightsPackage.Literals.OBJECT_RIGHT__RIGHT;
|
||||
import static com._1c.g5.v8.dt.rights.model.RightsPackage.Literals.OBJECT_RIGHT__VALUE;
|
||||
import static com._1c.g5.v8.dt.rights.model.RightsPackage.Literals.ROLE_DESCRIPTION;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.xtext.EcoreUtil2;
|
||||
|
||||
import com._1c.g5.v8.bm.integration.IBmModel;
|
||||
import com._1c.g5.v8.dt.common.StringUtils;
|
||||
import com._1c.g5.v8.dt.core.platform.IBmModelManager;
|
||||
import com._1c.g5.v8.dt.core.platform.IV8Project;
|
||||
import com._1c.g5.v8.dt.core.platform.IV8ProjectManager;
|
||||
import com._1c.g5.v8.dt.md.MdUtil;
|
||||
import com._1c.g5.v8.dt.metadata.mdclass.MdObject;
|
||||
import com._1c.g5.v8.dt.metadata.mdclass.Role;
|
||||
import com._1c.g5.v8.dt.metadata.mdclass.ScriptVariant;
|
||||
import com._1c.g5.v8.dt.rights.model.ObjectRight;
|
||||
import com._1c.g5.v8.dt.rights.model.ObjectRights;
|
||||
import com._1c.g5.v8.dt.rights.model.Right;
|
||||
import com._1c.g5.v8.dt.rights.model.RightValue;
|
||||
import com._1c.g5.v8.dt.rights.model.RoleDescription;
|
||||
import com._1c.g5.v8.dt.rights.model.util.RightName;
|
||||
import com._1c.g5.v8.dt.rights.model.util.RightsModelUtil;
|
||||
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.google.inject.Inject;
|
||||
|
||||
/**
|
||||
* Abstract check that role has some right for any object.
|
||||
*
|
||||
* @author Dmitriy Marmyshev
|
||||
*
|
||||
*/
|
||||
public abstract class RoleRightSetCheck
|
||||
extends BasicCheck
|
||||
{
|
||||
|
||||
protected static final String EXCLUDE_ROLE_NAME_PATTERN_PARAMETER_NAME = "excludeRoleNamePattern"; //$NON-NLS-1$
|
||||
|
||||
protected static final String EXCLUDE_OBJECT_NAME_PATTERN_PARAMETER_NAME = "excludeObjectNamePattern"; //$NON-NLS-1$
|
||||
|
||||
private final IV8ProjectManager v8ProjectManager;
|
||||
|
||||
private final IBmModelManager bmModelManager;
|
||||
|
||||
/**
|
||||
* Creates new instance which helps to check that role has specified right for an object.
|
||||
*
|
||||
* @param v8ProjectManager the V8 project manager, cannot be {@code null}.
|
||||
* @param bmModelManager the BM model manager, cannot be {@code null}.
|
||||
*/
|
||||
@Inject
|
||||
public RoleRightSetCheck(IV8ProjectManager v8ProjectManager, IBmModelManager bmModelManager)
|
||||
{
|
||||
this.v8ProjectManager = v8ProjectManager;
|
||||
this.bmModelManager = bmModelManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configureCheck(CheckConfigurer builder)
|
||||
{
|
||||
builder.complexity(CheckComplexity.NORMAL)
|
||||
.severity(IssueSeverity.MAJOR)
|
||||
.issueType(IssueType.SECURITY)
|
||||
.topObject(ROLE_DESCRIPTION)
|
||||
.containment(OBJECT_RIGHT)
|
||||
.features(OBJECT_RIGHT__RIGHT, OBJECT_RIGHT__VALUE)
|
||||
.parameter(EXCLUDE_ROLE_NAME_PATTERN_PARAMETER_NAME, String.class, StringUtils.EMPTY,
|
||||
Messages.RoleRightSetCheck_Exclude_Role_name_pattern)
|
||||
.parameter(EXCLUDE_OBJECT_NAME_PATTERN_PARAMETER_NAME, String.class, StringUtils.EMPTY,
|
||||
Messages.RoleRightSetCheck_Exclude_Right_Object_name_pattern);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void check(Object object, ResultAcceptor resultAceptor, ICheckParameters parameters,
|
||||
IProgressMonitor monitor)
|
||||
{
|
||||
ObjectRight objectRight = (ObjectRight)object;
|
||||
Right right = objectRight.getRight();
|
||||
|
||||
if (right == null || !getRightName().getName().equals(right.getName()))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Role role = null;
|
||||
|
||||
RightValue rightValue = objectRight.getValue();
|
||||
if (rightValue == null)
|
||||
{
|
||||
role = getRole(objectRight);
|
||||
rightValue = RightsModelUtil.getDefaultRightValue(objectRight, role);
|
||||
}
|
||||
|
||||
if (!RightsModelUtil.getBooleanRightValue(rightValue) || monitor.isCanceled())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
String excludeRoleNamePattern = parameters.getString(EXCLUDE_ROLE_NAME_PATTERN_PARAMETER_NAME);
|
||||
if (excludeRoleNamePattern != null && !excludeRoleNamePattern.isBlank())
|
||||
{
|
||||
if (role == null)
|
||||
{
|
||||
role = getRole(objectRight);
|
||||
}
|
||||
if (role == null || !role.getName().matches(excludeRoleNamePattern))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
ObjectRights rights = EcoreUtil2.getContainerOfType(objectRight, ObjectRights.class);
|
||||
MdObject mdObject = rights.getObject() instanceof MdObject ? (MdObject)rights.getObject() : null;
|
||||
|
||||
String excludeObjectNamePattern = parameters.getString(EXCLUDE_OBJECT_NAME_PATTERN_PARAMETER_NAME);
|
||||
if (excludeObjectNamePattern != null && !excludeObjectNamePattern.isBlank() && mdObject != null
|
||||
&& mdObject.getName().matches(excludeObjectNamePattern))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
String message = getIssueMessage(right, mdObject);
|
||||
resultAceptor.addIssue(message, OBJECT_RIGHT__RIGHT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the object right name that need to check that exist in role rights.
|
||||
*
|
||||
* @return the right name constant, cannot return {@code null}.
|
||||
*/
|
||||
protected abstract RightName getRightName();
|
||||
|
||||
/**
|
||||
* Creates formated issue message for the right and the MD object.
|
||||
*
|
||||
* @param right the right that forbidden to set for the MD object, cannot be {@code null}.
|
||||
* @param mdObject the MD object that has forbidden right, cannot be {@code null}.
|
||||
* @return the formatted issue message that right set for the object, cannot return {@code null}.
|
||||
*/
|
||||
protected String getIssueMessage(Right right, MdObject mdObject)
|
||||
{
|
||||
IV8Project project = mdObject == null ? null : v8ProjectManager.getProject(mdObject);
|
||||
String rightName = getRightName(right, project);
|
||||
String mdObjectName = getMdObjectName(mdObject, project);
|
||||
return MessageFormat.format(Messages.RoleRightSetCheck_Role_right__0__set_for__1, rightName, mdObjectName);
|
||||
}
|
||||
|
||||
private Role getRole(ObjectRight objectRight)
|
||||
{
|
||||
IBmModel model = bmModelManager.getModel(objectRight);
|
||||
RoleDescription description = EcoreUtil2.getContainerOfType(objectRight, RoleDescription.class);
|
||||
Role role = RightsModelUtil.getOwner(description, model);
|
||||
return role;
|
||||
}
|
||||
|
||||
private String getRightName(Right right, IV8Project project)
|
||||
{
|
||||
if (project != null && project.getScriptVariant() == ScriptVariant.RUSSIAN)
|
||||
{
|
||||
return right.getNameRu();
|
||||
}
|
||||
return right.getName();
|
||||
}
|
||||
|
||||
private String getMdObjectName(MdObject mdObject, IV8Project project)
|
||||
{
|
||||
if (mdObject == null)
|
||||
return "Unknown"; //$NON-NLS-1$
|
||||
|
||||
if (project != null && project.getScriptVariant() == ScriptVariant.RUSSIAN)
|
||||
{
|
||||
return MdUtil.getFullyQualifiedNameRu(mdObject).toString();
|
||||
}
|
||||
return MdUtil.getFullyQualifiedName(mdObject).toString();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
RightInteracitveDelete_title=Right set: Interactive Delete
|
||||
###############################################################################
|
||||
# Copyright (C) 2021, 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
|
||||
###############################################################################
|
||||
RightInteracitveDelete_description=Role Right set: Interactive Delete
|
||||
RightInteracitveDeleteMarkedPredefinedData_description=Role Right set: Interactive Delete marked predefined data
|
||||
RightInteracitveDeleteMarkedPredefinedData_title=Right set: Interactive Delete marked predefined data
|
||||
RightInteracitveDeletePredefinedData_description=Role Right set: Interactive Delete predefined data
|
||||
RightInteracitveDeletePredefinedData_title=Right set: Interactive Delete predefined data
|
||||
RightInteractiveClearDeletionMarkPredefinedData_description=Role Right set: Interactive clear deletion mark predefined data
|
||||
RightInteractiveClearDeletionMarkPredefinedData_title=Right set: Interactive clear deletion mark predefined data
|
||||
RightInteractiveSetDeletionMarkPredefinedData_description=Role Right set: Interactive set deletion mark predefined data
|
||||
RightInteractiveSetDeletionMarkPredefinedData_title=Right set: Interactive set deletion mark predefined data
|
||||
RoleRightHasRls_description=Role Right has RLS in full-access role
|
||||
RoleRightHasRls_Exclude_Right_Object_name_pattern=Exclude Right Object name pattern
|
||||
RoleRightHasRls_Role_name_pattern=Role name pattern
|
||||
RoleRightHasRls_Role_Right__0__for__1__has_RLS=Role Right "{0}" for "{1}" has RLS
|
||||
RoleRightHasRls_title=Role Right has RLS
|
||||
RoleRightSetCheck_Exclude_Right_Object_name_pattern=Exclude Right Object name pattern
|
||||
RoleRightSetCheck_Exclude_Role_name_pattern=Exclude Role name pattern
|
||||
RoleRightSetCheck_Role_right__0__set_for__1=Role right "{0}" set for "{1}"
|
@ -0,0 +1,50 @@
|
||||
#Generated by ResourceBundle Editor (http://essiembre.github.io/eclipse-rbe/)
|
||||
###############################################################################
|
||||
# Copyright (C) 2021, 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
|
||||
###############################################################################
|
||||
#Generated by ResourceBundle Editor (http://essiembre.github.io/eclipse-rbe/)
|
||||
|
||||
RightInteracitveDeleteMarkedPredefinedData_description = Право роли установлено: Интерактивное удаление помеченных предопределенных данных
|
||||
|
||||
RightInteracitveDeleteMarkedPredefinedData_title = Право установлено: Интерактивное удаление помеченных предопределенных данных
|
||||
|
||||
RightInteracitveDeletePredefinedData_description = Право роли установлено: Интерактивное удаление предопределенных данных
|
||||
|
||||
RightInteracitveDeletePredefinedData_title = Право установлено: Интерактивное удаление предопределенных данных
|
||||
|
||||
RightInteracitveDelete_description = Право роли установлено: Интерактивное удаление
|
||||
|
||||
RightInteracitveDelete_title = Право установлено: Интерактивное удаление
|
||||
|
||||
RightInteractiveClearDeletionMarkPredefinedData_description = Право роли установлено: Интерактивное снятие пометки удаления предопределенных данных
|
||||
|
||||
RightInteractiveClearDeletionMarkPredefinedData_title = Право установлено: Интерактивное снятие пометки удаления предопределенных данных
|
||||
|
||||
RightInteractiveSetDeletionMarkPredefinedData_description = Право роли установлено: Интерактивная установка пометки удаления предопределенных данных
|
||||
|
||||
RightInteractiveSetDeletionMarkPredefinedData_title = Право установлено: Интерактивная установка пометки удаления предопределенных данных
|
||||
|
||||
RoleRightHasRls_Exclude_Right_Object_name_pattern = Шаблон исключения по имени объекта
|
||||
|
||||
RoleRightHasRls_Role_Right__0__for__1__has_RLS = Право "{0}" в роле для "{1}" содержит RLS
|
||||
|
||||
RoleRightHasRls_Role_name_pattern = Шаблон имени роли
|
||||
|
||||
RoleRightHasRls_description = Права в роли содержат RLS в полно-правной роле
|
||||
|
||||
RoleRightHasRls_title = Права в роли содержат RLS
|
||||
|
||||
RoleRightSetCheck_Exclude_Right_Object_name_pattern = Шаблон исключения по имени объекта
|
||||
|
||||
RoleRightSetCheck_Exclude_Role_name_pattern = Шаблон исключения по имени роли
|
||||
|
||||
RoleRightSetCheck_Role_right__0__set_for__1 = Право "{0}" роли установлено для "{1}"
|
@ -29,6 +29,7 @@
|
||||
<module>com.e1c.v8codestyle.autosort</module>
|
||||
<module>com.e1c.v8codestyle.autosort.ui</module>
|
||||
<module>com.e1c.v8codestyle.ql</module>
|
||||
<module>com.e1c.v8codestyle.right</module>
|
||||
</modules>
|
||||
|
||||
<build>
|
||||
|
@ -81,4 +81,11 @@
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="com.e1c.v8codestyle.right"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
</feature>
|
||||
|
7
tests/com.e1c.v8codestyle.right.itests/.classpath
Normal file
7
tests/com.e1c.v8codestyle.right.itests/.classpath
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
28
tests/com.e1c.v8codestyle.right.itests/.project
Normal file
28
tests/com.e1c.v8codestyle.right.itests/.project
Normal file
@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>com.e1c.v8codestyle.right.itests</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
@ -0,0 +1,10 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
|
||||
org.eclipse.jdt.core.compiler.compliance=11
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
|
||||
org.eclipse.jdt.core.compiler.release=enabled
|
||||
org.eclipse.jdt.core.compiler.source=11
|
15
tests/com.e1c.v8codestyle.right.itests/META-INF/MANIFEST.MF
Normal file
15
tests/com.e1c.v8codestyle.right.itests/META-INF/MANIFEST.MF
Normal file
@ -0,0 +1,15 @@
|
||||
Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: %pluginName
|
||||
Bundle-SymbolicName: com.e1c.v8codestyle.right.itests;singleton:=true
|
||||
Bundle-Version: 0.1.0.qualifier
|
||||
Bundle-Vendor: %providerName
|
||||
Fragment-Host: com.e1c.v8codestyle.right;bundle-version="[0.1.0,0.2.0)"
|
||||
Automatic-Module-Name: com.e1c.v8codestyle.right.itests
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-11
|
||||
Bundle-Localization: fragment
|
||||
Import-Package: com._1c.g5.v8.dt.core.platform;version="10.4.0",
|
||||
com._1c.g5.v8.dt.testing;version="[3.1.0,4.0.0)",
|
||||
com._1c.g5.v8.dt.validation.marker;version="[4.0.0,5.0.0)",
|
||||
com.e1c.g5.v8.dt.testing.check;version="[1.0.0,2.0.0)",
|
||||
org.junit;version="[4.13.0,5.0.0)"
|
18
tests/com.e1c.v8codestyle.right.itests/build.properties
Normal file
18
tests/com.e1c.v8codestyle.right.itests/build.properties
Normal file
@ -0,0 +1,18 @@
|
||||
###############################################################################
|
||||
# Copyright (C) 2021, 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
|
||||
###############################################################################
|
||||
source.. = src/
|
||||
output.. = bin/
|
||||
bin.includes = META-INF/,\
|
||||
.,\
|
||||
fragment.properties,\
|
||||
workspace/
|
15
tests/com.e1c.v8codestyle.right.itests/fragment.properties
Normal file
15
tests/com.e1c.v8codestyle.right.itests/fragment.properties
Normal file
@ -0,0 +1,15 @@
|
||||
###############################################################################
|
||||
# Copyright (C) 2021, 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
|
||||
###############################################################################
|
||||
#Properties file for com.e1c.v8codestyle.right.itests
|
||||
providerName = 1C-Soft LLC
|
||||
pluginName = 1C:Code style V8 Role Rights Integration test plugin
|
27
tests/com.e1c.v8codestyle.right.itests/pom.xml
Normal file
27
tests/com.e1c.v8codestyle.right.itests/pom.xml
Normal file
@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Copyright (C) 2021, 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
|
||||
-->
|
||||
|
||||
<project
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.e1c.v8codestyle</groupId>
|
||||
<artifactId>tests</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>com.e1c.v8codestyle.right.itests</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<packaging>eclipse-test-plugin</packaging>
|
||||
</project>
|
@ -0,0 +1,337 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (C) 2021, 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.right.check.itests;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import com._1c.g5.v8.bm.core.IBmObject;
|
||||
import com._1c.g5.v8.dt.core.platform.IDtProject;
|
||||
import com._1c.g5.v8.dt.rights.model.ObjectRight;
|
||||
import com._1c.g5.v8.dt.rights.model.ObjectRights;
|
||||
import com._1c.g5.v8.dt.rights.model.RoleDescription;
|
||||
import com._1c.g5.v8.dt.rights.model.util.RightName;
|
||||
import com._1c.g5.v8.dt.validation.marker.Marker;
|
||||
import com.e1c.g5.v8.dt.check.settings.CheckUid;
|
||||
import com.e1c.g5.v8.dt.testing.check.CheckTestBase;
|
||||
import com.e1c.v8codestyle.right.check.RightInteracitveDelete;
|
||||
import com.e1c.v8codestyle.right.check.RightInteracitveDeleteMarkedPredefinedData;
|
||||
import com.e1c.v8codestyle.right.check.RightInteracitveDeletePredefinedData;
|
||||
import com.e1c.v8codestyle.right.check.RightInteractiveClearDeletionMarkPredefinedData;
|
||||
import com.e1c.v8codestyle.right.check.RightInteractiveSetDeletionMarkPredefinedData;
|
||||
|
||||
/**
|
||||
* Tests for all forbidden rights checks:
|
||||
* {@link RightInteracitveDelete},
|
||||
* {@link RightInteracitveDeleteMarkedPredefinedData},
|
||||
* {@link RightInteracitveDeletePredefinedData},
|
||||
* {@link RightInteractiveClearDeletionMarkPredefinedData},
|
||||
* {@link RightInteractiveSetDeletionMarkPredefinedData}.
|
||||
*
|
||||
* @author Dmitriy Marmyshev
|
||||
*/
|
||||
public class RoleRightHasForbiddenTest
|
||||
extends CheckTestBase
|
||||
{
|
||||
|
||||
private static final String CHECK_ID_1 = "right-interactive-delete";
|
||||
|
||||
private static final String CHECK_ID_2 = "right-interactive-delete-marked-predefined-data";
|
||||
|
||||
private static final String CHECK_ID_3 = "right-interactive-delete-predefined-data";
|
||||
|
||||
private static final String CHECK_ID_4 = "right-interactive-clear-deletion-mark-predefined-data";
|
||||
|
||||
private static final String CHECK_ID_5 = "right-interactive-set-deletion-mark-predefined-data";
|
||||
|
||||
private static final String PROJECT_NAME = "RoleRightHasForbidden";
|
||||
|
||||
private static final String FQN_FORBIDDEN_RIGHTS = "Role.ForbiddenRights.Rights";
|
||||
|
||||
private static final String FQN_ALLOWED_RIGHTS = "Role.AllowedRights.Rights";
|
||||
|
||||
private IDtProject dtProject;
|
||||
|
||||
@Override
|
||||
protected boolean enableCleanUp()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Before
|
||||
public void initProject() throws Exception
|
||||
{
|
||||
IProject project = testingWorkspace.getProject(PROJECT_NAME);
|
||||
if (project.isAccessible())
|
||||
{
|
||||
testingWorkspace.waitForBuildCompletion();
|
||||
dtProject = dtProjectManager.getDtProject(project);
|
||||
assertNotNull(dtProject);
|
||||
waitForDD(dtProject);
|
||||
}
|
||||
else
|
||||
{
|
||||
dtProject = openProjectAndWaitForValidationFinish(PROJECT_NAME);
|
||||
}
|
||||
assertNotNull(dtProject);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test role has forbidden right, check {@link RightInteracitveDelete}
|
||||
*
|
||||
* @throws Exception the exception
|
||||
*/
|
||||
@Test
|
||||
public void testRoleHasRightInteracitveDelete() throws Exception
|
||||
{
|
||||
IBmObject top = getTopObjectByFqn(FQN_FORBIDDEN_RIGHTS, dtProject);
|
||||
assertTrue(top instanceof RoleDescription);
|
||||
RoleDescription description = (RoleDescription)top;
|
||||
assertEquals(1, description.getRights().size());
|
||||
ObjectRights rights = description.getRights().get(0);
|
||||
ObjectRight right = getObjectRight(rights, RightName.INTERACTIVE_DELETE);
|
||||
assertNotNull(right);
|
||||
|
||||
Marker marker = getFirstMarker(CHECK_ID_1, right, dtProject);
|
||||
assertNotNull(marker);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Test role has forbidden right, check {@link RightInteracitveDeleteMarkedPredefinedData}
|
||||
*
|
||||
* @throws Exception the exception
|
||||
*/
|
||||
@Test
|
||||
public void testRoleHasRightInteracitveDeleteMarkedPredefinedData() throws Exception
|
||||
{
|
||||
IBmObject top = getTopObjectByFqn(FQN_FORBIDDEN_RIGHTS, dtProject);
|
||||
assertTrue(top instanceof RoleDescription);
|
||||
RoleDescription description = (RoleDescription)top;
|
||||
assertEquals(1, description.getRights().size());
|
||||
ObjectRights rights = description.getRights().get(0);
|
||||
ObjectRight right = getObjectRight(rights, RightName.INTERACTIVE_DELETE_MARKED_PREDEFINED_DATA);
|
||||
assertNotNull(right);
|
||||
|
||||
Marker marker = getFirstMarker(CHECK_ID_2, right, dtProject);
|
||||
assertNotNull(marker);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Test role has forbidden right, check {@link RightInteracitveDeletePredefinedData}
|
||||
*
|
||||
* @throws Exception the exception
|
||||
*/
|
||||
@Test
|
||||
public void testRoleHasRightInteracitveDeletePredefinedData() throws Exception
|
||||
{
|
||||
IBmObject top = getTopObjectByFqn(FQN_FORBIDDEN_RIGHTS, dtProject);
|
||||
assertTrue(top instanceof RoleDescription);
|
||||
RoleDescription description = (RoleDescription)top;
|
||||
assertEquals(1, description.getRights().size());
|
||||
ObjectRights rights = description.getRights().get(0);
|
||||
ObjectRight right = getObjectRight(rights, RightName.INTERACTIVE_DELETE_PREDEFINED_DATA);
|
||||
assertNotNull(right);
|
||||
|
||||
Marker marker = getFirstMarker(CHECK_ID_3, right, dtProject);
|
||||
assertNotNull(marker);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Test role has forbidden right, check {@link RightInteractiveClearDeletionMarkPredefinedData}
|
||||
*
|
||||
* @throws Exception the exception
|
||||
*/
|
||||
@Test
|
||||
public void testRoleHasRightInteractiveClearDeletionMarkPredefinedData() throws Exception
|
||||
{
|
||||
IBmObject top = getTopObjectByFqn(FQN_FORBIDDEN_RIGHTS, dtProject);
|
||||
assertTrue(top instanceof RoleDescription);
|
||||
RoleDescription description = (RoleDescription)top;
|
||||
assertEquals(1, description.getRights().size());
|
||||
ObjectRights rights = description.getRights().get(0);
|
||||
ObjectRight right = getObjectRight(rights, RightName.INTERACTIVE_CLEAR_DELETION_MARK_PREDEFINED_DATA);
|
||||
assertNotNull(right);
|
||||
|
||||
Marker marker = getFirstMarker(CHECK_ID_4, right, dtProject);
|
||||
assertNotNull(marker);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Test role has forbidden right, check {@link RightInteractiveSetDeletionMarkPredefinedData}
|
||||
*
|
||||
* @throws Exception the exception
|
||||
*/
|
||||
@Test
|
||||
public void testRoleHasRightInteractiveSetDeletionMarkPredefinedData() throws Exception
|
||||
{
|
||||
IBmObject top = getTopObjectByFqn(FQN_FORBIDDEN_RIGHTS, dtProject);
|
||||
assertTrue(top instanceof RoleDescription);
|
||||
RoleDescription description = (RoleDescription)top;
|
||||
assertEquals(1, description.getRights().size());
|
||||
ObjectRights rights = description.getRights().get(0);
|
||||
ObjectRight right = getObjectRight(rights, RightName.INTERACTIVE_SET_DELETION_MARK_PREDEFINED_DATA);
|
||||
assertNotNull(right);
|
||||
|
||||
Marker marker = getFirstMarker(CHECK_ID_5, right, dtProject);
|
||||
assertNotNull(marker);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Test role has no forbidden right, check {@link RightInteracitveDelete}
|
||||
*
|
||||
* @throws Exception the exception
|
||||
*/
|
||||
@Test
|
||||
public void testRoleHasNoRightInteracitveDelete() throws Exception
|
||||
{
|
||||
IBmObject top = getTopObjectByFqn(FQN_ALLOWED_RIGHTS, dtProject);
|
||||
assertTrue(top instanceof RoleDescription);
|
||||
RoleDescription description = (RoleDescription)top;
|
||||
assertEquals(1, description.getRights().size());
|
||||
ObjectRights rights = description.getRights().get(0);
|
||||
ObjectRight right = getObjectRight(rights, RightName.INTERACTIVE_DELETE);
|
||||
assertNull(right);
|
||||
|
||||
Marker[] markers = markerManager.getNestedMarkers(dtProject.getWorkspaceProject(), top.bmGetId());
|
||||
Marker marker = getAnyFirstMarker(CHECK_ID_1, markers);
|
||||
assertNull(marker);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Test role has no forbidden right, check {@link RightInteracitveDeleteMarkedPredefinedData}
|
||||
*
|
||||
* @throws Exception the exception
|
||||
*/
|
||||
@Test
|
||||
public void testRoleHasNoRightInteracitveDeleteMarkedPredefinedData() throws Exception
|
||||
{
|
||||
IBmObject top = getTopObjectByFqn(FQN_ALLOWED_RIGHTS, dtProject);
|
||||
assertTrue(top instanceof RoleDescription);
|
||||
RoleDescription description = (RoleDescription)top;
|
||||
assertEquals(1, description.getRights().size());
|
||||
ObjectRights rights = description.getRights().get(0);
|
||||
ObjectRight right = getObjectRight(rights, RightName.INTERACTIVE_DELETE_MARKED_PREDEFINED_DATA);
|
||||
assertNull(right);
|
||||
|
||||
Marker[] markers = markerManager.getNestedMarkers(dtProject.getWorkspaceProject(), top.bmGetId());
|
||||
Marker marker = getAnyFirstMarker(CHECK_ID_2, markers);
|
||||
assertNull(marker);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Test role has no forbidden right, check {@link RightInteracitveDeletePredefinedData}
|
||||
*
|
||||
* @throws Exception the exception
|
||||
*/
|
||||
@Test
|
||||
public void testRoleHasNoRightInteracitveDeletePredefinedData() throws Exception
|
||||
{
|
||||
IBmObject top = getTopObjectByFqn(FQN_ALLOWED_RIGHTS, dtProject);
|
||||
assertTrue(top instanceof RoleDescription);
|
||||
RoleDescription description = (RoleDescription)top;
|
||||
assertEquals(1, description.getRights().size());
|
||||
ObjectRights rights = description.getRights().get(0);
|
||||
ObjectRight right = getObjectRight(rights, RightName.INTERACTIVE_DELETE_PREDEFINED_DATA);
|
||||
assertNull(right);
|
||||
|
||||
Marker[] markers = markerManager.getNestedMarkers(dtProject.getWorkspaceProject(), top.bmGetId());
|
||||
Marker marker = getAnyFirstMarker(CHECK_ID_3, markers);
|
||||
assertNull(marker);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Test role has no forbidden right, check {@link RightInteractiveClearDeletionMarkPredefinedData}
|
||||
*
|
||||
* @throws Exception the exception
|
||||
*/
|
||||
@Test
|
||||
public void testRoleHasNoRightInteractiveClearDeletionMarkPredefinedData() throws Exception
|
||||
{
|
||||
IBmObject top = getTopObjectByFqn(FQN_ALLOWED_RIGHTS, dtProject);
|
||||
assertTrue(top instanceof RoleDescription);
|
||||
RoleDescription description = (RoleDescription)top;
|
||||
assertEquals(1, description.getRights().size());
|
||||
ObjectRights rights = description.getRights().get(0);
|
||||
ObjectRight right = getObjectRight(rights, RightName.INTERACTIVE_CLEAR_DELETION_MARK_PREDEFINED_DATA);
|
||||
assertNull(right);
|
||||
|
||||
Marker[] markers = markerManager.getNestedMarkers(dtProject.getWorkspaceProject(), top.bmGetId());
|
||||
Marker marker = getAnyFirstMarker(CHECK_ID_4, markers);
|
||||
assertNull(marker);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Test role has no forbidden right, check {@link RightInteractiveSetDeletionMarkPredefinedData}
|
||||
*
|
||||
* @throws Exception the exception
|
||||
*/
|
||||
@Test
|
||||
public void testRoleHasNoRightInteractiveSetDeletionMarkPredefinedData() throws Exception
|
||||
{
|
||||
IBmObject top = getTopObjectByFqn(FQN_ALLOWED_RIGHTS, dtProject);
|
||||
assertTrue(top instanceof RoleDescription);
|
||||
RoleDescription description = (RoleDescription)top;
|
||||
assertEquals(1, description.getRights().size());
|
||||
ObjectRights rights = description.getRights().get(0);
|
||||
ObjectRight right = getObjectRight(rights, RightName.INTERACTIVE_SET_DELETION_MARK_PREDEFINED_DATA);
|
||||
assertNull(right);
|
||||
|
||||
Marker[] markers = markerManager.getNestedMarkers(dtProject.getWorkspaceProject(), top.bmGetId());
|
||||
Marker marker = getAnyFirstMarker(CHECK_ID_5, markers);
|
||||
assertNull(marker);
|
||||
|
||||
}
|
||||
|
||||
private ObjectRight getObjectRight(ObjectRights rights, RightName name)
|
||||
{
|
||||
for (ObjectRight right : rights.getRights())
|
||||
{
|
||||
if (name.getName().equals(right.getRight().getName()))
|
||||
{
|
||||
return right;
|
||||
}
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private Marker getAnyFirstMarker(String chekcId, Marker[] markers)
|
||||
{
|
||||
for (int i = 0; i < markers.length; i++)
|
||||
{
|
||||
Marker marker = markers[i];
|
||||
CheckUid checkUid = checkRepository.getUidForShortUid(marker.getCheckId(), dtProject.getWorkspaceProject());
|
||||
if (chekcId.equals(checkUid.getCheckId()))
|
||||
{
|
||||
return marker;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,118 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (C) 2021, 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.right.check.itests;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import com._1c.g5.v8.bm.core.IBmObject;
|
||||
import com._1c.g5.v8.dt.core.platform.IDtProject;
|
||||
import com._1c.g5.v8.dt.rights.model.ObjectRight;
|
||||
import com._1c.g5.v8.dt.rights.model.ObjectRights;
|
||||
import com._1c.g5.v8.dt.rights.model.Rls;
|
||||
import com._1c.g5.v8.dt.rights.model.RoleDescription;
|
||||
import com._1c.g5.v8.dt.validation.marker.Marker;
|
||||
import com.e1c.g5.v8.dt.testing.check.CheckTestBase;
|
||||
import com.e1c.v8codestyle.right.check.RoleRightHasRls;
|
||||
|
||||
/**
|
||||
* Tests for {@link RoleRightHasRls} check.
|
||||
*
|
||||
* @author Dmitriy Marmyshev
|
||||
*/
|
||||
public class RoleRightHasRlsTest
|
||||
extends CheckTestBase
|
||||
{
|
||||
|
||||
private static final String CHECK_ID = "role-right-has-rls"; //$NON-NLS-1$
|
||||
|
||||
private static final String PROJECT_NAME = "RoleRightHasRls";
|
||||
|
||||
/**
|
||||
* Test role with full-access has RLS
|
||||
*
|
||||
* @throws Exception the exception
|
||||
*/
|
||||
@Test
|
||||
public void testFullAccessHasRls() throws Exception
|
||||
{
|
||||
IDtProject dtProject = openProjectAndWaitForValidationFinish(PROJECT_NAME);
|
||||
assertNotNull(dtProject);
|
||||
|
||||
IBmObject top = getTopObjectByFqn("Role.FullAccess.Rights", dtProject);
|
||||
assertTrue(top instanceof RoleDescription);
|
||||
RoleDescription description = (RoleDescription)top;
|
||||
assertEquals(2, description.getRights().size());
|
||||
|
||||
ObjectRights rights = description.getRights().get(1);
|
||||
assertEquals(1, rights.getRights().size());
|
||||
ObjectRight right = rights.getRights().get(0);
|
||||
assertEquals(1, right.getRestrictionsByCondition().size());
|
||||
Rls rls = right.getRestrictionsByCondition().get(0);
|
||||
|
||||
Marker marker = getFirstMarker(CHECK_ID, rls, dtProject);
|
||||
assertNotNull(marker);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Test role with full-access has no RLS
|
||||
*
|
||||
* @throws Exception the exception
|
||||
*/
|
||||
@Test
|
||||
public void testFullAccessHasNoRls() throws Exception
|
||||
{
|
||||
IDtProject dtProject = openProjectAndWaitForValidationFinish(PROJECT_NAME);
|
||||
assertNotNull(dtProject);
|
||||
|
||||
IBmObject top = getTopObjectByFqn("Role.SystemAdministrator.Rights", dtProject);
|
||||
|
||||
Marker[] markers = markerManager.getNestedMarkers(dtProject.getWorkspaceProject(), top.bmGetId());
|
||||
assertNotNull(markers);
|
||||
assertEquals(0, markers.length);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Test role none full-access has RLS
|
||||
*
|
||||
* @throws Exception the exception
|
||||
*/
|
||||
@Test
|
||||
public void testNoneFullAccessHasRls() throws Exception
|
||||
{
|
||||
IDtProject dtProject = openProjectAndWaitForValidationFinish(PROJECT_NAME);
|
||||
assertNotNull(dtProject);
|
||||
|
||||
IBmObject top = getTopObjectByFqn("Role.OtherRls.Rights", dtProject);
|
||||
assertTrue(top instanceof RoleDescription);
|
||||
RoleDescription description = (RoleDescription)top;
|
||||
assertEquals(1, description.getRights().size());
|
||||
|
||||
ObjectRights rights = description.getRights().get(0);
|
||||
assertEquals(2, rights.getRights().size());
|
||||
ObjectRight right = rights.getRights().get(0);
|
||||
assertEquals(1, right.getRestrictionsByCondition().size());
|
||||
Rls rls = right.getRestrictionsByCondition().get(0);
|
||||
|
||||
Marker marker = getFirstMarker(CHECK_ID, rls, dtProject);
|
||||
assertNull(marker);
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>RoleRightHasForbidden</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
|
||||
<nature>com._1c.g5.v8.dt.core.V8ConfigurationNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
@ -0,0 +1,2 @@
|
||||
Manifest-Version: 1.0
|
||||
Runtime-Version: 8.3.19
|
@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<mdclass:Catalog xmlns:mdclass="http://g5.1c.ru/v8/dt/metadata/mdclass" uuid="2db0bb6d-88b3-4c33-9526-9c912d140131">
|
||||
<producedTypes>
|
||||
<objectType typeId="53490472-0c9c-4f94-a4d0-21cdb0bf64bc" valueTypeId="7b730dea-a4ec-49a9-a8f1-2127ef5e94ae"/>
|
||||
<refType typeId="7a142eb3-36e4-43e5-ab24-71a416e06da2" valueTypeId="267734e0-b1d9-49df-bc38-34db90b3ded7"/>
|
||||
<selectionType typeId="1e9f7362-d169-4afe-bb5f-dcd84090241c" valueTypeId="d2f1ab3e-5123-4999-bd7d-9e0bb4437097"/>
|
||||
<listType typeId="371e1bab-27db-4f80-aa90-977595534b46" valueTypeId="45671a7a-6729-4e0d-84e9-d29dbd31a4de"/>
|
||||
<managerType typeId="fcd31416-c7e8-4d77-b976-67468db3feae" valueTypeId="fdbdb6db-1573-4bef-b48f-6b297b3c25c9"/>
|
||||
</producedTypes>
|
||||
<name>Products</name>
|
||||
<synonym>
|
||||
<key>en</key>
|
||||
<value>Products</value>
|
||||
</synonym>
|
||||
<useStandardCommands>true</useStandardCommands>
|
||||
<inputByString>Catalog.Products.StandardAttribute.Code</inputByString>
|
||||
<inputByString>Catalog.Products.StandardAttribute.Description</inputByString>
|
||||
<fullTextSearchOnInputByString>DontUse</fullTextSearchOnInputByString>
|
||||
<createOnInput>Use</createOnInput>
|
||||
<dataLockControlMode>Managed</dataLockControlMode>
|
||||
<fullTextSearch>Use</fullTextSearch>
|
||||
<levelCount>2</levelCount>
|
||||
<foldersOnTop>true</foldersOnTop>
|
||||
<codeLength>9</codeLength>
|
||||
<descriptionLength>25</descriptionLength>
|
||||
<codeType>String</codeType>
|
||||
<codeAllowedLength>Variable</codeAllowedLength>
|
||||
<checkUnique>true</checkUnique>
|
||||
<autonumbering>true</autonumbering>
|
||||
<defaultPresentation>AsDescription</defaultPresentation>
|
||||
<editType>InDialog</editType>
|
||||
<choiceMode>BothWays</choiceMode>
|
||||
</mdclass:Catalog>
|
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<cmi:CommandInterface xmlns:cmi="http://g5.1c.ru/v8/dt/cmi"/>
|
@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<mdclass:Configuration xmlns:mdclass="http://g5.1c.ru/v8/dt/metadata/mdclass" uuid="9d9b343b-26c3-46e5-a701-4363dba87338">
|
||||
<name>RoleRightHasForbidden</name>
|
||||
<synonym>
|
||||
<key>en</key>
|
||||
<value>Role right has forbidden</value>
|
||||
</synonym>
|
||||
<containedObjects classId="9cd510cd-abfc-11d4-9434-004095e12fc7" objectId="ff2d3d9d-70dd-4ccf-b6de-535bb8ca7f4e"/>
|
||||
<containedObjects classId="9fcd25a0-4822-11d4-9414-008048da11f9" objectId="68a3dfa7-33b5-4aaf-952b-c5872180aa84"/>
|
||||
<containedObjects classId="e3687481-0a87-462c-a166-9f34594f9bba" objectId="74d36a43-8a9b-41c8-a2f8-d7fb846e2c47"/>
|
||||
<containedObjects classId="9de14907-ec23-4a07-96f0-85521cb6b53b" objectId="2c79fd8d-314d-4a86-9e47-7d4e65ffc337"/>
|
||||
<containedObjects classId="51f2d5d8-ea4d-4064-8892-82951750031e" objectId="e325d79d-fb3d-4c12-849d-9e5a0ffc6970"/>
|
||||
<containedObjects classId="e68182ea-4237-4383-967f-90c1e3370bc7" objectId="95708a14-536e-4155-ab38-61087920fa6b"/>
|
||||
<containedObjects classId="fb282519-d103-4dd3-bc12-cb271d631dfc" objectId="5dbd49ff-26f0-4978-a0ba-ea5f88639553"/>
|
||||
<configurationExtensionCompatibilityMode>8.3.19</configurationExtensionCompatibilityMode>
|
||||
<defaultRunMode>ManagedApplication</defaultRunMode>
|
||||
<usePurposes>PersonalComputer</usePurposes>
|
||||
<usedMobileApplicationFunctionalities>
|
||||
<functionality>
|
||||
<use>true</use>
|
||||
</functionality>
|
||||
<functionality>
|
||||
<functionality>OSBackup</functionality>
|
||||
<use>true</use>
|
||||
</functionality>
|
||||
</usedMobileApplicationFunctionalities>
|
||||
<defaultLanguage>Language.English</defaultLanguage>
|
||||
<dataLockControlMode>Managed</dataLockControlMode>
|
||||
<objectAutonumerationMode>NotAutoFree</objectAutonumerationMode>
|
||||
<modalityUseMode>DontUse</modalityUseMode>
|
||||
<synchronousPlatformExtensionAndAddInCallUseMode>DontUse</synchronousPlatformExtensionAndAddInCallUseMode>
|
||||
<compatibilityMode>8.3.19</compatibilityMode>
|
||||
<languages uuid="3f22f2b0-8f1b-4df6-ba72-8056676d8b42">
|
||||
<name>English</name>
|
||||
<synonym>
|
||||
<key>en</key>
|
||||
<value>English</value>
|
||||
</synonym>
|
||||
<languageCode>en</languageCode>
|
||||
</languages>
|
||||
<roles>Role.AllowedRights</roles>
|
||||
<roles>Role.ForbiddenRights</roles>
|
||||
<roles>Role.FullAccess</roles>
|
||||
<catalogs>Catalog.Products</catalogs>
|
||||
</mdclass:Configuration>
|
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<cmi:CommandInterface xmlns:cmi="http://g5.1c.ru/v8/dt/cmi"/>
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<mdclass:Role xmlns:mdclass="http://g5.1c.ru/v8/dt/metadata/mdclass" uuid="016afe4a-a546-41c6-87b1-4fbe9738d2e8">
|
||||
<name>AllowedRights</name>
|
||||
<synonym>
|
||||
<key>en</key>
|
||||
<value>Allowed rights</value>
|
||||
</synonym>
|
||||
</mdclass:Role>
|
@ -0,0 +1,89 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Rights xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://v8.1c.ru/8.2/roles" xsi:type="Rights">
|
||||
<setForNewObjects>false</setForNewObjects>
|
||||
<setForAttributesByDefault>true</setForAttributesByDefault>
|
||||
<independentRightsOfChildObjects>false</independentRightsOfChildObjects>
|
||||
<object>
|
||||
<name>Catalog.Products</name>
|
||||
<right>
|
||||
<name>UpdateDataHistoryVersionComment</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>View</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>InputByString</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>InteractiveInsert</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>Update</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>UpdateDataHistory</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>EditDataHistoryVersionComment</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>SwitchToDataHistoryVersion</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>InteractiveDeleteMarked</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>UpdateDataHistoryOfMissingData</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>InteractiveClearDeletionMark</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>Edit</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>InteractiveSetDeletionMark</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>ViewDataHistory</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>Read</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>Delete</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>ReadDataHistory</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>UpdateDataHistorySettings</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>ReadDataHistoryOfMissingData</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>Insert</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
</object>
|
||||
</Rights>
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<mdclass:Role xmlns:mdclass="http://g5.1c.ru/v8/dt/metadata/mdclass" uuid="19629fde-5c76-440f-a556-e86ab793beb5">
|
||||
<name>ForbiddenRights</name>
|
||||
<synonym>
|
||||
<key>en</key>
|
||||
<value>Forbidden rights</value>
|
||||
</synonym>
|
||||
</mdclass:Role>
|
@ -0,0 +1,77 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Rights xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://v8.1c.ru/8.2/roles" xsi:type="Rights">
|
||||
<setForNewObjects>false</setForNewObjects>
|
||||
<setForAttributesByDefault>true</setForAttributesByDefault>
|
||||
<independentRightsOfChildObjects>false</independentRightsOfChildObjects>
|
||||
<object>
|
||||
<name>Catalog.Products</name>
|
||||
<right>
|
||||
<name>Insert</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>Read</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>Update</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>Delete</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>View</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>Edit</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>InputByString</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>InteractiveDelete</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>InteractiveInsert</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>InteractiveSetDeletionMark</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>InteractiveClearDeletionMark</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>InteractiveDeleteMarked</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>InteractiveDeletePredefinedData</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>InteractiveSetDeletionMarkPredefinedData</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>InteractiveClearDeletionMarkPredefinedData</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>InteractiveDeleteMarkedPredefinedData</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>SwitchToDataHistoryVersion</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
</object>
|
||||
</Rights>
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<mdclass:Role xmlns:mdclass="http://g5.1c.ru/v8/dt/metadata/mdclass" uuid="dd94ccd8-de4b-4f1e-b54c-c3977da8fec2">
|
||||
<name>FullAccess</name>
|
||||
<synonym>
|
||||
<key>en</key>
|
||||
<value>Full access</value>
|
||||
</synonym>
|
||||
</mdclass:Role>
|
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Rights xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://v8.1c.ru/8.2/roles" xsi:type="Rights">
|
||||
<setForNewObjects>true</setForNewObjects>
|
||||
<setForAttributesByDefault>true</setForAttributesByDefault>
|
||||
<independentRightsOfChildObjects>false</independentRightsOfChildObjects>
|
||||
</Rights>
|
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>RoleRightHasRls</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
|
||||
<nature>com._1c.g5.v8.dt.core.V8ConfigurationNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
@ -0,0 +1,2 @@
|
||||
Manifest-Version: 1.0
|
||||
Runtime-Version: 8.3.19
|
@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<mdclass:Catalog xmlns:mdclass="http://g5.1c.ru/v8/dt/metadata/mdclass" uuid="2db0bb6d-88b3-4c33-9526-9c912d140131">
|
||||
<producedTypes>
|
||||
<objectType typeId="53490472-0c9c-4f94-a4d0-21cdb0bf64bc" valueTypeId="7b730dea-a4ec-49a9-a8f1-2127ef5e94ae"/>
|
||||
<refType typeId="7a142eb3-36e4-43e5-ab24-71a416e06da2" valueTypeId="267734e0-b1d9-49df-bc38-34db90b3ded7"/>
|
||||
<selectionType typeId="1e9f7362-d169-4afe-bb5f-dcd84090241c" valueTypeId="d2f1ab3e-5123-4999-bd7d-9e0bb4437097"/>
|
||||
<listType typeId="371e1bab-27db-4f80-aa90-977595534b46" valueTypeId="45671a7a-6729-4e0d-84e9-d29dbd31a4de"/>
|
||||
<managerType typeId="fcd31416-c7e8-4d77-b976-67468db3feae" valueTypeId="fdbdb6db-1573-4bef-b48f-6b297b3c25c9"/>
|
||||
</producedTypes>
|
||||
<name>Products</name>
|
||||
<synonym>
|
||||
<key>en</key>
|
||||
<value>Products</value>
|
||||
</synonym>
|
||||
<useStandardCommands>true</useStandardCommands>
|
||||
<inputByString>Catalog.Products.StandardAttribute.Code</inputByString>
|
||||
<inputByString>Catalog.Products.StandardAttribute.Description</inputByString>
|
||||
<fullTextSearchOnInputByString>DontUse</fullTextSearchOnInputByString>
|
||||
<createOnInput>Use</createOnInput>
|
||||
<dataLockControlMode>Managed</dataLockControlMode>
|
||||
<fullTextSearch>Use</fullTextSearch>
|
||||
<levelCount>2</levelCount>
|
||||
<foldersOnTop>true</foldersOnTop>
|
||||
<codeLength>9</codeLength>
|
||||
<descriptionLength>25</descriptionLength>
|
||||
<codeType>String</codeType>
|
||||
<codeAllowedLength>Variable</codeAllowedLength>
|
||||
<checkUnique>true</checkUnique>
|
||||
<autonumbering>true</autonumbering>
|
||||
<defaultPresentation>AsDescription</defaultPresentation>
|
||||
<editType>InDialog</editType>
|
||||
<choiceMode>BothWays</choiceMode>
|
||||
</mdclass:Catalog>
|
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<cmi:CommandInterface xmlns:cmi="http://g5.1c.ru/v8/dt/cmi"/>
|
@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<mdclass:Configuration xmlns:mdclass="http://g5.1c.ru/v8/dt/metadata/mdclass" uuid="9d9b343b-26c3-46e5-a701-4363dba87338">
|
||||
<name>RoleRightHasRls</name>
|
||||
<synonym>
|
||||
<key>en</key>
|
||||
<value>Role right has rls</value>
|
||||
</synonym>
|
||||
<containedObjects classId="9cd510cd-abfc-11d4-9434-004095e12fc7" objectId="ff2d3d9d-70dd-4ccf-b6de-535bb8ca7f4e"/>
|
||||
<containedObjects classId="9fcd25a0-4822-11d4-9414-008048da11f9" objectId="68a3dfa7-33b5-4aaf-952b-c5872180aa84"/>
|
||||
<containedObjects classId="e3687481-0a87-462c-a166-9f34594f9bba" objectId="74d36a43-8a9b-41c8-a2f8-d7fb846e2c47"/>
|
||||
<containedObjects classId="9de14907-ec23-4a07-96f0-85521cb6b53b" objectId="2c79fd8d-314d-4a86-9e47-7d4e65ffc337"/>
|
||||
<containedObjects classId="51f2d5d8-ea4d-4064-8892-82951750031e" objectId="e325d79d-fb3d-4c12-849d-9e5a0ffc6970"/>
|
||||
<containedObjects classId="e68182ea-4237-4383-967f-90c1e3370bc7" objectId="95708a14-536e-4155-ab38-61087920fa6b"/>
|
||||
<containedObjects classId="fb282519-d103-4dd3-bc12-cb271d631dfc" objectId="5dbd49ff-26f0-4978-a0ba-ea5f88639553"/>
|
||||
<configurationExtensionCompatibilityMode>8.3.19</configurationExtensionCompatibilityMode>
|
||||
<defaultRunMode>ManagedApplication</defaultRunMode>
|
||||
<usePurposes>PersonalComputer</usePurposes>
|
||||
<usedMobileApplicationFunctionalities>
|
||||
<functionality>
|
||||
<use>true</use>
|
||||
</functionality>
|
||||
<functionality>
|
||||
<functionality>OSBackup</functionality>
|
||||
<use>true</use>
|
||||
</functionality>
|
||||
</usedMobileApplicationFunctionalities>
|
||||
<defaultLanguage>Language.English</defaultLanguage>
|
||||
<dataLockControlMode>Managed</dataLockControlMode>
|
||||
<objectAutonumerationMode>NotAutoFree</objectAutonumerationMode>
|
||||
<modalityUseMode>DontUse</modalityUseMode>
|
||||
<synchronousPlatformExtensionAndAddInCallUseMode>DontUse</synchronousPlatformExtensionAndAddInCallUseMode>
|
||||
<compatibilityMode>8.3.19</compatibilityMode>
|
||||
<languages uuid="3f22f2b0-8f1b-4df6-ba72-8056676d8b42">
|
||||
<name>English</name>
|
||||
<synonym>
|
||||
<key>en</key>
|
||||
<value>English</value>
|
||||
</synonym>
|
||||
<languageCode>en</languageCode>
|
||||
</languages>
|
||||
<roles>Role.FullAccess</roles>
|
||||
<roles>Role.SystemAdministrator</roles>
|
||||
<roles>Role.OtherRls</roles>
|
||||
<catalogs>Catalog.Products</catalogs>
|
||||
</mdclass:Configuration>
|
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<cmi:CommandInterface xmlns:cmi="http://g5.1c.ru/v8/dt/cmi"/>
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<mdclass:Role xmlns:mdclass="http://g5.1c.ru/v8/dt/metadata/mdclass" uuid="19629fde-5c76-440f-a556-e86ab793beb5">
|
||||
<name>FullAccess</name>
|
||||
<synonym>
|
||||
<key>en</key>
|
||||
<value>Full access</value>
|
||||
</synonym>
|
||||
</mdclass:Role>
|
@ -0,0 +1,87 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Rights xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://v8.1c.ru/8.2/roles" xsi:type="Rights">
|
||||
<setForNewObjects>true</setForNewObjects>
|
||||
<setForAttributesByDefault>true</setForAttributesByDefault>
|
||||
<independentRightsOfChildObjects>false</independentRightsOfChildObjects>
|
||||
<object>
|
||||
<name>Configuration.RoleRightHasRls</name>
|
||||
<right>
|
||||
<name>Administration</name>
|
||||
<value>false</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>DataAdministration</name>
|
||||
<value>false</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>UpdateDataBaseConfiguration</name>
|
||||
<value>false</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>ExclusiveMode</name>
|
||||
<value>false</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>ActiveUsers</name>
|
||||
<value>false</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>EventLog</name>
|
||||
<value>false</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>MobileClient</name>
|
||||
<value>false</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>ThickClient</name>
|
||||
<value>false</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>ExternalConnection</name>
|
||||
<value>false</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>Automation</name>
|
||||
<value>false</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>TechnicalSpecialistMode</name>
|
||||
<value>false</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>CollaborationSystemInfoBaseRegistration</name>
|
||||
<value>false</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>ExclusiveModeTerminationAtSessionStart</name>
|
||||
<value>false</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>ConfigurationExtensionsAdministration</name>
|
||||
<value>false</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>InteractiveOpenExtDataProcessors</name>
|
||||
<value>false</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>InteractiveOpenExtReports</name>
|
||||
<value>false</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>Output</name>
|
||||
<value>false</value>
|
||||
</right>
|
||||
</object>
|
||||
<object>
|
||||
<name>Catalog.Products</name>
|
||||
<right>
|
||||
<name>Insert</name>
|
||||
<value>true</value>
|
||||
<restrictionByCondition>
|
||||
<condition>FALSE</condition>
|
||||
</restrictionByCondition>
|
||||
</right>
|
||||
</object>
|
||||
</Rights>
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<mdclass:Role xmlns:mdclass="http://g5.1c.ru/v8/dt/metadata/mdclass" uuid="1da60ec1-178b-40e9-bc4e-9c3cecb5a2e0">
|
||||
<name>OtherRls</name>
|
||||
<synonym>
|
||||
<key>en</key>
|
||||
<value>Other rls</value>
|
||||
</synonym>
|
||||
</mdclass:Role>
|
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Rights xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://v8.1c.ru/8.2/roles" xsi:type="Rights">
|
||||
<setForNewObjects>false</setForNewObjects>
|
||||
<setForAttributesByDefault>true</setForAttributesByDefault>
|
||||
<independentRightsOfChildObjects>false</independentRightsOfChildObjects>
|
||||
<object>
|
||||
<name>Catalog.Products</name>
|
||||
<right>
|
||||
<name>Insert</name>
|
||||
<value>true</value>
|
||||
<restrictionByCondition>
|
||||
<condition>FALSE</condition>
|
||||
</restrictionByCondition>
|
||||
</right>
|
||||
<right>
|
||||
<name>Read</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
</object>
|
||||
</Rights>
|
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Rights xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://v8.1c.ru/8.2/roles" xsi:type="Rights">
|
||||
<setForNewObjects>false</setForNewObjects>
|
||||
<setForAttributesByDefault>true</setForAttributesByDefault>
|
||||
<independentRightsOfChildObjects>false</independentRightsOfChildObjects>
|
||||
<object>
|
||||
<name>Catalog.Products</name>
|
||||
<right>
|
||||
<name>Insert</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>Read</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
</object>
|
||||
</Rights>
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<mdclass:Role xmlns:mdclass="http://g5.1c.ru/v8/dt/metadata/mdclass" uuid="eda82a71-66cf-4b16-ae3e-2d1b2fc3b126">
|
||||
<name>SystemAdministrator</name>
|
||||
<synonym>
|
||||
<key>en</key>
|
||||
<value>System administrator</value>
|
||||
</synonym>
|
||||
</mdclass:Role>
|
@ -28,6 +28,7 @@
|
||||
<module>com.e1c.v8codestyle.bsl.itests</module>
|
||||
<module>com.e1c.v8codestyle.autosort.itests</module>
|
||||
<module>com.e1c.v8codestyle.ql.itests</module>
|
||||
<module>com.e1c.v8codestyle.right.itests</module>
|
||||
</modules>
|
||||
|
||||
<profiles>
|
||||
|
Reference in New Issue
Block a user