mirror of
https://github.com/IRPTeam/IRP.git
synced 2025-09-16 08:56:27 +02:00
#SDR-418 Add secure data storage for integration settings (#2846)
* #SDR-418 Add secure data storage for integration settings Introduces secure storage for sensitive integration settings via a new information register and module. Adds the StoreInSecureStorage attribute to IntegrationSettings, updates forms and logic to support storing and retrieving hidden values securely, and configures roles and access rights for secure data management. * Fix typo and add SecureDataStorage access key module Corrects the typo 'PalceHolder' to 'PlaceHolder' in SecureDataStorage modules and updates all references. Adds ManagerModule for SecureDataStorage information register with GetAccessKey function. Excludes SecureDataStorage from access key checks in Unit_AccessSubsystem. * Restrict SecureDataStorage read access for roles Added or updated read rights for InformationRegister.SecureDataStorage in multiple role definitions, setting access to true but restricting it with a WHERE FALSE condition to effectively deny access. This change standardizes the handling of SecureDataStorage read permissions across BasicRole, FullAccess, FullAccessNoAdminFunctions, and FullAccessOnlyRead roles. * Update _2000LoadCurrencyRate.feature * Update connection setting retrieval in FillByDefaultAtServer Replaced GetConnectionSetting() with IntegrationServer.ConnectionSettingTemplate using Object.IntegrationType and Object to obtain connection settings. This change ensures the correct template is used based on the integration type. * Rename parameter in Unit_SendRequestClientServer Changed the parameter name from ConnectionSetting to ConnectionSettingData in Unit_SendRequestClientServer and assigned its Value to ConnectionSetting. This clarifies the source of the connection settings and improves code readability. * Handle ConnectionSettingData without Value property Updated Unit_SendRequestClientServer to support cases where ConnectionSettingData may not have a Value property or is not a Structure. This improves robustness when handling different types of input for connection settings. * Exclude SecureDataStorage from tree population Updated the FillTree procedure to skip the InformationRegisters.SecureDataStorage entry when populating the tree. This prevents SecureDataStorage from being included in the form's metadata tree. --------- Co-authored-by: Natalia Trukhachova <66120736+Severnity@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
0ce7ac7882
commit
58bd2e12c1
@@ -1,19 +1,93 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<form:Form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:core="http://g5.1c.ru/v8/dt/mcore" xmlns:form="http://g5.1c.ru/v8/dt/form">
|
||||
<items xsi:type="form:FormField">
|
||||
<name>Code</name>
|
||||
<id>57</id>
|
||||
<items xsi:type="form:FormGroup">
|
||||
<name>GroupTop</name>
|
||||
<id>96</id>
|
||||
<items xsi:type="form:FormField">
|
||||
<name>Code</name>
|
||||
<id>57</id>
|
||||
<visible>true</visible>
|
||||
<enabled>true</enabled>
|
||||
<userVisible>
|
||||
<common>true</common>
|
||||
</userVisible>
|
||||
<dataPath xsi:type="form:DataPath">
|
||||
<segments>Object.Code</segments>
|
||||
</dataPath>
|
||||
<extendedTooltip>
|
||||
<name>CodeExtendedTooltip</name>
|
||||
<id>59</id>
|
||||
<type>Label</type>
|
||||
<autoMaxWidth>true</autoMaxWidth>
|
||||
<autoMaxHeight>true</autoMaxHeight>
|
||||
<extInfo xsi:type="form:LabelDecorationExtInfo">
|
||||
<horizontalAlign>Left</horizontalAlign>
|
||||
</extInfo>
|
||||
</extendedTooltip>
|
||||
<contextMenu>
|
||||
<name>CodeContextMenu</name>
|
||||
<id>58</id>
|
||||
<autoFill>true</autoFill>
|
||||
</contextMenu>
|
||||
<type>InputField</type>
|
||||
<editMode>Enter</editMode>
|
||||
<showInHeader>true</showInHeader>
|
||||
<headerHorizontalAlign>Left</headerHorizontalAlign>
|
||||
<showInFooter>true</showInFooter>
|
||||
<extInfo xsi:type="form:InputFieldExtInfo">
|
||||
<autoMaxWidth>true</autoMaxWidth>
|
||||
<autoMaxHeight>true</autoMaxHeight>
|
||||
<wrap>true</wrap>
|
||||
<chooseType>true</chooseType>
|
||||
<typeDomainEnabled>true</typeDomainEnabled>
|
||||
<textEdit>true</textEdit>
|
||||
</extInfo>
|
||||
</items>
|
||||
<items xsi:type="form:FormField">
|
||||
<name>StoreInSecureStorage</name>
|
||||
<id>98</id>
|
||||
<visible>true</visible>
|
||||
<enabled>true</enabled>
|
||||
<userVisible>
|
||||
<common>true</common>
|
||||
</userVisible>
|
||||
<dataPath xsi:type="form:DataPath">
|
||||
<segments>Object.StoreInSecureStorage</segments>
|
||||
</dataPath>
|
||||
<extendedTooltip>
|
||||
<name>StoreInSecureStorageExtendedTooltip</name>
|
||||
<id>100</id>
|
||||
<type>Label</type>
|
||||
<autoMaxWidth>true</autoMaxWidth>
|
||||
<autoMaxHeight>true</autoMaxHeight>
|
||||
<extInfo xsi:type="form:LabelDecorationExtInfo">
|
||||
<horizontalAlign>Left</horizontalAlign>
|
||||
</extInfo>
|
||||
</extendedTooltip>
|
||||
<contextMenu>
|
||||
<name>StoreInSecureStorageContextMenu</name>
|
||||
<id>99</id>
|
||||
<autoFill>true</autoFill>
|
||||
</contextMenu>
|
||||
<type>CheckBoxField</type>
|
||||
<editMode>Enter</editMode>
|
||||
<showInHeader>true</showInHeader>
|
||||
<headerHorizontalAlign>Left</headerHorizontalAlign>
|
||||
<showInFooter>true</showInFooter>
|
||||
<extInfo xsi:type="form:CheckBoxFieldExtInfo"/>
|
||||
</items>
|
||||
<visible>true</visible>
|
||||
<enabled>true</enabled>
|
||||
<userVisible>
|
||||
<common>true</common>
|
||||
</userVisible>
|
||||
<dataPath xsi:type="form:DataPath">
|
||||
<segments>Object.Code</segments>
|
||||
</dataPath>
|
||||
<title>
|
||||
<key>en</key>
|
||||
<value>Group top</value>
|
||||
</title>
|
||||
<extendedTooltip>
|
||||
<name>CodeExtendedTooltip</name>
|
||||
<id>59</id>
|
||||
<name>GroupTopExtendedTooltip</name>
|
||||
<id>97</id>
|
||||
<type>Label</type>
|
||||
<autoMaxWidth>true</autoMaxWidth>
|
||||
<autoMaxHeight>true</autoMaxHeight>
|
||||
@@ -21,23 +95,14 @@
|
||||
<horizontalAlign>Left</horizontalAlign>
|
||||
</extInfo>
|
||||
</extendedTooltip>
|
||||
<contextMenu>
|
||||
<name>CodeContextMenu</name>
|
||||
<id>58</id>
|
||||
<autoFill>true</autoFill>
|
||||
</contextMenu>
|
||||
<type>InputField</type>
|
||||
<editMode>Enter</editMode>
|
||||
<showInHeader>true</showInHeader>
|
||||
<headerHorizontalAlign>Left</headerHorizontalAlign>
|
||||
<showInFooter>true</showInFooter>
|
||||
<extInfo xsi:type="form:InputFieldExtInfo">
|
||||
<autoMaxWidth>true</autoMaxWidth>
|
||||
<autoMaxHeight>true</autoMaxHeight>
|
||||
<wrap>true</wrap>
|
||||
<chooseType>true</chooseType>
|
||||
<typeDomainEnabled>true</typeDomainEnabled>
|
||||
<textEdit>true</textEdit>
|
||||
<type>UsualGroup</type>
|
||||
<extInfo xsi:type="form:UsualGroupExtInfo">
|
||||
<group>AlwaysHorizontal</group>
|
||||
<behavior>Auto</behavior>
|
||||
<showLeftMargin>true</showLeftMargin>
|
||||
<united>true</united>
|
||||
<throughAlign>Auto</throughAlign>
|
||||
<currentRowUse>Auto</currentRowUse>
|
||||
</extInfo>
|
||||
</items>
|
||||
<items xsi:type="form:FormField">
|
||||
@@ -508,34 +573,6 @@
|
||||
<placementArea>UserCmds</placementArea>
|
||||
<representationInContextMenu>Auto</representationInContextMenu>
|
||||
</items>
|
||||
<items xsi:type="form:Button">
|
||||
<name>ConnectionSettingContextMenuTestConnection</name>
|
||||
<id>40</id>
|
||||
<title>
|
||||
<key>en</key>
|
||||
<value>Test</value>
|
||||
</title>
|
||||
<visible>true</visible>
|
||||
<enabled>true</enabled>
|
||||
<userVisible>
|
||||
<common>true</common>
|
||||
</userVisible>
|
||||
<extendedTooltip>
|
||||
<name>ConnectionSettingContextMenuTestConnectionExtendedTooltip</name>
|
||||
<id>41</id>
|
||||
<type>Label</type>
|
||||
<autoMaxWidth>true</autoMaxWidth>
|
||||
<autoMaxHeight>true</autoMaxHeight>
|
||||
<extInfo xsi:type="form:LabelDecorationExtInfo">
|
||||
<horizontalAlign>Left</horizontalAlign>
|
||||
</extInfo>
|
||||
</extendedTooltip>
|
||||
<commandName>Form.Command.TestConnection</commandName>
|
||||
<representation>Auto</representation>
|
||||
<autoMaxWidth>true</autoMaxWidth>
|
||||
<autoMaxHeight>true</autoMaxHeight>
|
||||
<placementArea>UserCmds</placementArea>
|
||||
</items>
|
||||
<horizontalAlign>Left</horizontalAlign>
|
||||
</autoCommandBar>
|
||||
<handlers>
|
||||
@@ -1086,6 +1123,34 @@
|
||||
<autoCommandBar>
|
||||
<name>FormCommandBar</name>
|
||||
<id>-1</id>
|
||||
<items xsi:type="form:Button">
|
||||
<name>ConnectionSettingContextMenuTestConnection</name>
|
||||
<id>40</id>
|
||||
<title>
|
||||
<key>en</key>
|
||||
<value>Test</value>
|
||||
</title>
|
||||
<visible>true</visible>
|
||||
<enabled>true</enabled>
|
||||
<userVisible>
|
||||
<common>true</common>
|
||||
</userVisible>
|
||||
<extendedTooltip>
|
||||
<name>ConnectionSettingContextMenuTestConnectionExtendedTooltip</name>
|
||||
<id>41</id>
|
||||
<type>Label</type>
|
||||
<autoMaxWidth>true</autoMaxWidth>
|
||||
<autoMaxHeight>true</autoMaxHeight>
|
||||
<extInfo xsi:type="form:LabelDecorationExtInfo">
|
||||
<horizontalAlign>Left</horizontalAlign>
|
||||
</extInfo>
|
||||
</extendedTooltip>
|
||||
<commandName>Form.Command.TestConnection</commandName>
|
||||
<representation>Auto</representation>
|
||||
<autoMaxWidth>true</autoMaxWidth>
|
||||
<autoMaxHeight>true</autoMaxHeight>
|
||||
<placementArea>UserCmds</placementArea>
|
||||
</items>
|
||||
<horizontalAlign>Left</horizontalAlign>
|
||||
<autoFill>true</autoFill>
|
||||
</autoCommandBar>
|
||||
@@ -1167,11 +1232,15 @@
|
||||
<use>
|
||||
<common>true</common>
|
||||
</use>
|
||||
<picture xsi:type="core:PictureRef">
|
||||
<picture>StdPicture.AppearanceCheckIcon</picture>
|
||||
</picture>
|
||||
<action xsi:type="form:FormCommandHandlerContainer">
|
||||
<handler>
|
||||
<name>TestConnection</name>
|
||||
</handler>
|
||||
</action>
|
||||
<representation>TextPicture</representation>
|
||||
<currentRowUse>Auto</currentRowUse>
|
||||
</formCommands>
|
||||
<formCommands>
|
||||
|
@@ -39,24 +39,24 @@ EndProcedure
|
||||
|
||||
&AtClient
|
||||
Procedure TestConnection(Command)
|
||||
|
||||
If Modified Then
|
||||
CommonFunctionsClientServer.ShowUsersMessage(R().InfoMessage_004);
|
||||
Return;
|
||||
EndIf;
|
||||
|
||||
TestConnectionCall();
|
||||
EndProcedure
|
||||
|
||||
&AtClient
|
||||
Procedure TestConnectionCall()
|
||||
|
||||
ConnectionSetting = GetConnectionSetting();
|
||||
|
||||
If Object.IntegrationType = PredefinedValue("Enum.IntegrationType.LocalFileStorage") Then
|
||||
TestRow = Object.ConnectionSetting.FindRows(New Structure("Key", "AddressPath"));
|
||||
IntegrationServer.SaveFileToFileStorage(TestRow[0].Value, "Test.png", PictureLib.DataHistory.GetBinaryData());
|
||||
IntegrationServer.SaveFileToFileStorage(ConnectionSetting.Value.AddressPath, "Test.png", PictureLib.DataHistory.GetBinaryData());
|
||||
CommonFunctionsClientServer.ShowUsersMessage(R().InfoMessage_005);
|
||||
ElsIf Object.IntegrationType = PredefinedValue("Enum.IntegrationType.Email") Then
|
||||
SettingsSource = Object.ConnectionSetting;
|
||||
If Not ServiceSystemServer.isProduction() Then
|
||||
SettingsSource = Object.ConnectionSettingTest;
|
||||
EndIf;
|
||||
ConnectionSetting = GetConnectionSetting();
|
||||
For Each Str In SettingsSource Do
|
||||
FillPropertyValues(ConnectionSetting, New Structure(Str.Key, Str.Value));
|
||||
EndDo;
|
||||
EmailMessagesServer.SendTestMessage(ConnectionSetting);
|
||||
ElsIf Object.IntegrationType = PredefinedValue("Enum.IntegrationType.SMSProvider") Then
|
||||
Params = SMSServer.TestConnectionParams();
|
||||
@@ -70,20 +70,6 @@ Procedure TestConnectionCall()
|
||||
EndIf;
|
||||
|
||||
ElsIf ExtensionCall_TestConnectionCall() = Undefined AND IntegrationServer.ExtensionCall_TestConnectionCall(Object.Ref) = Undefined Then
|
||||
ConnectionSetting = GetConnectionSetting();
|
||||
|
||||
SettingsSource = Object.ConnectionSetting;
|
||||
If Not ServiceSystemServer.isProduction() Then
|
||||
SettingsSource = Object.ConnectionSettingTest;
|
||||
EndIf;
|
||||
For Each Str In SettingsSource Do
|
||||
FillPropertyValues(ConnectionSetting, New Structure(Str.Key, Str.Value));
|
||||
EndDo;
|
||||
|
||||
ConnectionSetting.QueryType = "GET";
|
||||
ConnectionSetting.IntegrationSettingsRef = Object.Ref;
|
||||
ConnectionSetting.Insert("Headers", New Map);
|
||||
|
||||
ResourceParameters = New Structure();
|
||||
ResourceParameters.Insert("MetadataName", "TestConnection");
|
||||
ServerResponse = IntegrationClientServer.SendRequest(ConnectionSetting, ResourceParameters);
|
||||
@@ -94,7 +80,7 @@ EndProcedure
|
||||
|
||||
&AtServer
|
||||
Function GetConnectionSetting()
|
||||
Return IntegrationServer.ConnectionSettingTemplate(Object.IntegrationType, Object);
|
||||
Return IntegrationServer.ConnectionSetting(Object.Ref);
|
||||
EndFunction
|
||||
|
||||
&AtClient
|
||||
@@ -114,7 +100,7 @@ EndProcedure
|
||||
|
||||
&AtServer
|
||||
Procedure FillByDefaultAtServer()
|
||||
ConnectionSetting = GetConnectionSetting();
|
||||
ConnectionSetting = IntegrationServer.ConnectionSettingTemplate(Object.IntegrationType, Object);;
|
||||
For Each Str In ConnectionSetting Do
|
||||
|
||||
If Str.Key = "IntegrationSettingsRef" Then
|
||||
|
@@ -82,6 +82,21 @@
|
||||
<fullTextSearch>Use</fullTextSearch>
|
||||
<dataHistory>Use</dataHistory>
|
||||
</attributes>
|
||||
<attributes uuid="5185b3d9-aed5-4032-9d1d-e6b72e9584b6">
|
||||
<name>ExternalDataProcSettings</name>
|
||||
<synonym>
|
||||
<key>en</key>
|
||||
<value>Plugin settings</value>
|
||||
</synonym>
|
||||
<type>
|
||||
<types>ValueStorage</types>
|
||||
</type>
|
||||
<minValue xsi:type="core:UndefinedValue"/>
|
||||
<maxValue xsi:type="core:UndefinedValue"/>
|
||||
<fillValue xsi:type="core:UndefinedValue"/>
|
||||
<fullTextSearch>Use</fullTextSearch>
|
||||
<dataHistory>Use</dataHistory>
|
||||
</attributes>
|
||||
<attributes uuid="1ec86a86-9804-414c-96f9-68ce428fc58c">
|
||||
<name>IntegrationType</name>
|
||||
<synonym>
|
||||
@@ -97,14 +112,14 @@
|
||||
<fullTextSearch>Use</fullTextSearch>
|
||||
<dataHistory>Use</dataHistory>
|
||||
</attributes>
|
||||
<attributes uuid="5185b3d9-aed5-4032-9d1d-e6b72e9584b6">
|
||||
<name>ExternalDataProcSettings</name>
|
||||
<attributes uuid="a2092519-7bdf-4673-94e3-2f34135de3cf">
|
||||
<name>StoreInSecureStorage</name>
|
||||
<synonym>
|
||||
<key>en</key>
|
||||
<value>Plugin settings</value>
|
||||
<value>Store in secure storage</value>
|
||||
</synonym>
|
||||
<type>
|
||||
<types>ValueStorage</types>
|
||||
<types>Boolean</types>
|
||||
</type>
|
||||
<minValue xsi:type="core:UndefinedValue"/>
|
||||
<maxValue xsi:type="core:UndefinedValue"/>
|
||||
|
@@ -2,6 +2,9 @@ Procedure BeforeWrite(Cancel)
|
||||
If DataExchange.Load Then
|
||||
Return;
|
||||
EndIf;
|
||||
|
||||
UpdateSecureStorage();
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure OnWrite(Cancel)
|
||||
@@ -14,4 +17,25 @@ Procedure BeforeDelete(Cancel)
|
||||
If DataExchange.Load Then
|
||||
Return;
|
||||
EndIf;
|
||||
EndProcedure
|
||||
|
||||
Procedure UpdateSecureStorage()
|
||||
If ThisObject.StoreInSecureStorage Then
|
||||
For Each Row In ThisObject.ConnectionSetting Do
|
||||
If Row.Hide Then
|
||||
SetPrivilegedMode(True);
|
||||
SecureDataStorage.Add(ThisObject.Ref, Row.Key, Row.Value);
|
||||
SetPrivilegedMode(False);
|
||||
Row.Value = SecureDataStorage.PlaceHolder();
|
||||
EndIf;
|
||||
EndDo;
|
||||
For Each Row In ThisObject.ConnectionSettingTest Do
|
||||
If Row.Hide Then
|
||||
SetPrivilegedMode(True);
|
||||
SecureDataStorage.Add(ThisObject.Ref, "Test_" + Row.Key, Row.Value);
|
||||
SetPrivilegedMode(False);
|
||||
Row.Value = SecureDataStorage.PlaceHolder();
|
||||
EndIf;
|
||||
EndDo;
|
||||
EndIf;
|
||||
EndProcedure
|
@@ -217,7 +217,7 @@ EndFunction
|
||||
// Send test message.
|
||||
//
|
||||
// Parameters:
|
||||
// ConnectionSetting - See IntegrationServer.ConnectionSettingTemplate
|
||||
// ConnectionSetting - See IntegrationServer.ConnectionSetting
|
||||
Procedure SendTestMessage(ConnectionSetting) Export
|
||||
|
||||
MessageDescription = GetMessageDescription();
|
||||
@@ -225,9 +225,9 @@ Procedure SendTestMessage(ConnectionSetting) Export
|
||||
MessageDescription.Subject = "Test";
|
||||
MessageDescription.Texts.Add("<h1> Test </h1>");
|
||||
//@skip-check property-return-type, invocation-parameter-type-intersect
|
||||
MessageDescription.To.Add(ConnectionSetting.eMailForTest);
|
||||
MessageDescription.To.Add(ConnectionSetting.Value.eMailForTest);
|
||||
|
||||
Answer = SendMessage(MessageDescription, ConnectionSetting);
|
||||
Answer = SendMessage(MessageDescription, ConnectionSetting.Value);
|
||||
|
||||
If IsBlankString(Answer) Then
|
||||
CommonFunctionsClientServer.ShowUsersMessage(R().S_028);
|
||||
|
@@ -10,11 +10,23 @@ Function GetIntegrationSettings(IntegrationSettingName, AddInfo = Undefined) Exp
|
||||
|
||||
CustomizedSetting = New Structure();
|
||||
SettingsSource = IntegrationSettingsRef.ConnectionSetting;
|
||||
If Not ServiceSystemServer.isProduction() Then
|
||||
isProduction = ServiceSystemServer.isProduction();
|
||||
If Not isProduction Then
|
||||
SettingsSource = IntegrationSettingsRef.ConnectionSettingTest;
|
||||
EndIf;
|
||||
EndIf;
|
||||
StoreInSecureStorage = IntegrationSettingsRef.StoreInSecureStorage;
|
||||
For Each Str In SettingsSource Do
|
||||
If ValueIsFilled(Str.Value) Then
|
||||
If StoreInSecureStorage And Str.Hide Then
|
||||
SetPrivilegedMode(True);
|
||||
If isProduction Then
|
||||
Value = SecureDataStorage.GetKey(IntegrationSettingsRef, Str.Key);
|
||||
Else
|
||||
Value = SecureDataStorage.GetKey(IntegrationSettingsRef, "Test_" + Str.Key);
|
||||
EndIf;
|
||||
SetPrivilegedMode(False);
|
||||
|
||||
CustomizedSetting.Insert(Str.Key, Value);
|
||||
Else
|
||||
CustomizedSetting.Insert(Str.Key, Str.Value);
|
||||
EndIf;
|
||||
EndDo;
|
||||
|
@@ -2840,5 +2840,10 @@ Strings.Insert("ExternalAccountingOperationExchangeReport", NStr("en = 'External
|
||||
Strings.Insert("Task_Result_Confirmation_Not", NStr("en = 'Rejected'", Lang));
|
||||
#EndRegion
|
||||
|
||||
#Region SecureStorage
|
||||
Strings.Insert("SecureStorage_CanStoreOnlyStructure", NStr("en = 'It can be stored only Structure type'", Lang));
|
||||
|
||||
#EndRegion
|
||||
|
||||
Return Strings;
|
||||
EndFunction
|
||||
|
168
IRP/src/CommonModules/SecureDataStorage/Module.bsl
Normal file
168
IRP/src/CommonModules/SecureDataStorage/Module.bsl
Normal file
@@ -0,0 +1,168 @@
|
||||
// @strict-types
|
||||
|
||||
#Region Public
|
||||
|
||||
// Place holder.
|
||||
//
|
||||
// Returns:
|
||||
// String - Place holder
|
||||
Function PlaceHolder() Export
|
||||
Return "Stored in secure storage";
|
||||
EndFunction
|
||||
|
||||
// Set.
|
||||
//
|
||||
// Parameters:
|
||||
// Owner - See InformationRegister.SecureDataStorage.Owner
|
||||
// Data - Structure - Data
|
||||
Procedure Set(Owner, Data) Export
|
||||
If Not TypeOf(Data) = Type("Structure") Then
|
||||
//@skip-check property-return-type
|
||||
Raise R().SecureStorage_CanStoreOnlyStructure;
|
||||
EndIf;
|
||||
SetData(Owner, Data);
|
||||
EndProcedure
|
||||
|
||||
// Add.
|
||||
//
|
||||
// Parameters:
|
||||
// Owner - See InformationRegister.SecureDataStorage.Owner
|
||||
// Key - String - Key
|
||||
// Value - Arbitrary - Value to store
|
||||
Procedure Add(Owner, Key, Value) Export
|
||||
|
||||
If Value = PlaceHolder() Then
|
||||
Return;
|
||||
EndIf;
|
||||
|
||||
CurrentData = GetData(Owner);
|
||||
If CurrentData = Undefined Then
|
||||
CurrentData = New Structure;
|
||||
EndIf;
|
||||
|
||||
CurrentData.Insert(Key, Value);
|
||||
SetData(Owner, CurrentData);
|
||||
EndProcedure
|
||||
|
||||
// Get.
|
||||
//
|
||||
// Parameters:
|
||||
// Owner - See InformationRegister.SecureDataStorage.Owner
|
||||
//
|
||||
// Returns:
|
||||
// Undefined, Structure - Get
|
||||
Function Get(Owner) Export
|
||||
Return GetData(Owner);
|
||||
EndFunction
|
||||
|
||||
// Get key.
|
||||
//
|
||||
// Parameters:
|
||||
// Owner - See InformationRegister.SecureDataStorage.Owner
|
||||
// Key - String - Key to find
|
||||
//
|
||||
// Returns:
|
||||
// Undefined, Arbitrary - Found value or Undefined if not found
|
||||
Function GetKey(Owner, Key) Export
|
||||
CurrentData = GetData(Owner);
|
||||
If CurrentData = Undefined Then
|
||||
Return Undefined;
|
||||
EndIf;
|
||||
|
||||
If CurrentData.Property(Key) Then
|
||||
Return CurrentData[Key];
|
||||
EndIf;
|
||||
|
||||
Return Undefined;
|
||||
EndFunction
|
||||
|
||||
// Delete.
|
||||
//
|
||||
// Parameters:
|
||||
// Owner - See InformationRegister.SecureDataStorage.Owner
|
||||
Procedure Delete(Owner) Export
|
||||
Record = InformationRegisters.SecureDataStorage.CreateRecordManager();
|
||||
Record.Owner = Owner;
|
||||
Record.Delete();
|
||||
EndProcedure
|
||||
|
||||
// Delete key.
|
||||
//
|
||||
// Parameters:
|
||||
// Owner - See InformationRegister.SecureDataStorage.Owner
|
||||
// Key - String - Key to delete
|
||||
Procedure DeleteKey(Owner, Key) Export
|
||||
CurrentData = GetData(Owner);
|
||||
If CurrentData = Undefined Then
|
||||
Return;
|
||||
EndIf;
|
||||
|
||||
If CurrentData.Property(Key) Then
|
||||
CurrentData.Delete(Key);
|
||||
SetData(Owner, CurrentData);
|
||||
EndIf;
|
||||
EndProcedure
|
||||
|
||||
// Has key.
|
||||
//
|
||||
// Parameters:
|
||||
// Owner - See InformationRegister.SecureDataStorage.Owner
|
||||
// Key - String - Key to check
|
||||
//
|
||||
// Returns:
|
||||
// Boolean - True if key exists
|
||||
Function HasKey(Owner, Key) Export
|
||||
CurrentData = GetData(Owner);
|
||||
If CurrentData = Undefined Then
|
||||
Return False;
|
||||
EndIf;
|
||||
|
||||
Return CurrentData.Property(Key);
|
||||
EndFunction
|
||||
|
||||
#EndRegion
|
||||
|
||||
#Region Service
|
||||
// Set data.
|
||||
//
|
||||
// Parameters:
|
||||
// Owner - See InformationRegister.SecureDataStorage.Owner
|
||||
// Data - Structure - Data
|
||||
Procedure SetData(Owner, Data)
|
||||
Record = InformationRegisters.SecureDataStorage.CreateRecordManager();
|
||||
Record.Owner = Owner;
|
||||
Record.Data = New ValueStorage(Data);
|
||||
Record.Write();
|
||||
EndProcedure
|
||||
|
||||
// Get data.
|
||||
//
|
||||
// Parameters:
|
||||
// Owner - See InformationRegister.SecureDataStorage.Owner
|
||||
//
|
||||
// Returns:
|
||||
// Undefined, Structure - Get data
|
||||
Function GetData(Owner)
|
||||
Query = New Query;
|
||||
Query.Text =
|
||||
"SELECT
|
||||
| SecureDataStorage.Data AS Data
|
||||
|FROM
|
||||
| InformationRegister.SecureDataStorage AS SecureDataStorage
|
||||
|WHERE
|
||||
| SecureDataStorage.Owner = &Owner";
|
||||
|
||||
Query.SetParameter("Owner", Owner);
|
||||
|
||||
QueryResult = Query.Execute();
|
||||
|
||||
SelectionDetailRecords = QueryResult.Select();
|
||||
|
||||
While SelectionDetailRecords.Next() Do
|
||||
//@skip-check property-return-type, dynamic-access-method-not-found
|
||||
Return SelectionDetailRecords.Data.Get();
|
||||
EndDo;
|
||||
Return Undefined;
|
||||
EndFunction
|
||||
|
||||
#EndRegion
|
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<mdclass:CommonModule xmlns:mdclass="http://g5.1c.ru/v8/dt/metadata/mdclass" uuid="439131ad-7af3-48b2-8e54-417913ecb7af">
|
||||
<name>SecureDataStorage</name>
|
||||
<synonym>
|
||||
<key>en</key>
|
||||
<value>Secure data storage</value>
|
||||
</synonym>
|
||||
<server>true</server>
|
||||
<externalConnection>true</externalConnection>
|
||||
<clientOrdinaryApplication>true</clientOrdinaryApplication>
|
||||
</mdclass:CommonModule>
|
@@ -305,7 +305,6 @@
|
||||
<roles>Role.AccumulationRegisters_R3026B_SalesOrdersCustomerAdvance</roles>
|
||||
<roles>Role.AccumulationRegisters_R3027B_EmployeeCashAdvance</roles>
|
||||
<roles>Role.AccumulationRegisters_R3035T_CashPlanning</roles>
|
||||
<roles>Role.DELETE_AccumulationRegisters_R3040B_WithholdingTax</roles>
|
||||
<roles>Role.AccumulationRegisters_R3050T_PosCashBalances</roles>
|
||||
<roles>Role.AccumulationRegisters_R4010B_ActualStocks</roles>
|
||||
<roles>Role.AccumulationRegisters_R4011B_FreeStocks</roles>
|
||||
@@ -366,12 +365,14 @@
|
||||
<roles>Role.AccumulationRegisters_TM1010T_RowIDMovements</roles>
|
||||
<roles>Role.AccumulationRegisters_TM1020B_AdvancesKey</roles>
|
||||
<roles>Role.AccumulationRegisters_TM1030B_TransactionsKey</roles>
|
||||
<roles>Role.AdminAccessToSecureStorage</roles>
|
||||
<roles>Role.AttachedFilesDelete</roles>
|
||||
<roles>Role.AuditLockSet</roles>
|
||||
<roles>Role.AuditLockUnset</roles>
|
||||
<roles>Role.BasicRole</roles>
|
||||
<roles>Role.Catalog_Files</roles>
|
||||
<roles>Role.CreateOrModifyUsers</roles>
|
||||
<roles>Role.DELETE_AccumulationRegisters_R3040B_WithholdingTax</roles>
|
||||
<roles>Role.Document_AdditionalAccrual</roles>
|
||||
<roles>Role.Document_AdditionalCostAllocation</roles>
|
||||
<roles>Role.Document_AdditionalDeduction</roles>
|
||||
@@ -531,6 +532,7 @@
|
||||
<commonModules>CommonModule.BarcodeServer</commonModules>
|
||||
<commonModules>CommonModule.BuilderAPI</commonModules>
|
||||
<commonModules>CommonModule.BuilderServer_V2</commonModules>
|
||||
<commonModules>CommonModule.BusinessProcessesServer</commonModules>
|
||||
<commonModules>CommonModule.CalculationServer</commonModules>
|
||||
<commonModules>CommonModule.CatAgreementsServer</commonModules>
|
||||
<commonModules>CommonModule.CatalogsServer</commonModules>
|
||||
@@ -625,6 +627,8 @@
|
||||
<commonModules>CommonModule.DocExpenseRevenueAccrualsClient</commonModules>
|
||||
<commonModules>CommonModule.DocExpenseRevenueAccrualsServer</commonModules>
|
||||
<commonModules>CommonModule.DocExternalAccountingOperationServer</commonModules>
|
||||
<commonModules>CommonModule.DocFixedAssetRevaluationClient</commonModules>
|
||||
<commonModules>CommonModule.DocFixedAssetRevaluationServer</commonModules>
|
||||
<commonModules>CommonModule.DocFixedAssetTransferClient</commonModules>
|
||||
<commonModules>CommonModule.DocFixedAssetTransferServer</commonModules>
|
||||
<commonModules>CommonModule.DocGoodsReceiptClient</commonModules>
|
||||
@@ -782,6 +786,7 @@
|
||||
<commonModules>CommonModule.JorDocumentsClientServer</commonModules>
|
||||
<commonModules>CommonModule.JorDocumentsServer</commonModules>
|
||||
<commonModules>CommonModule.LandedCostServer</commonModules>
|
||||
<commonModules>CommonModule.LandedCostServer2</commonModules>
|
||||
<commonModules>CommonModule.Localization</commonModules>
|
||||
<commonModules>CommonModule.LocalizationClient</commonModules>
|
||||
<commonModules>CommonModule.LocalizationClientServer</commonModules>
|
||||
@@ -791,6 +796,7 @@
|
||||
<commonModules>CommonModule.LockDataModificationPrivileged</commonModules>
|
||||
<commonModules>CommonModule.LockDataModificationReuse</commonModules>
|
||||
<commonModules>CommonModule.Log</commonModules>
|
||||
<commonModules>CommonModule.LoggerServerCall</commonModules>
|
||||
<commonModules>CommonModule.ManufacturingClient</commonModules>
|
||||
<commonModules>CommonModule.ManufacturingServer</commonModules>
|
||||
<commonModules>CommonModule.MessagesServer</commonModules>
|
||||
@@ -827,6 +833,7 @@
|
||||
<commonModules>CommonModule.SalaryPrivileged</commonModules>
|
||||
<commonModules>CommonModule.SalaryServer</commonModules>
|
||||
<commonModules>CommonModule.ScheduledJobsForExtentions</commonModules>
|
||||
<commonModules>CommonModule.SecureDataStorage</commonModules>
|
||||
<commonModules>CommonModule.SerialLotNumberClient</commonModules>
|
||||
<commonModules>CommonModule.SerialLotNumberClientServer</commonModules>
|
||||
<commonModules>CommonModule.SerialLotNumbersServer</commonModules>
|
||||
@@ -834,6 +841,7 @@
|
||||
<commonModules>CommonModule.ServiceSystemClient</commonModules>
|
||||
<commonModules>CommonModule.ServiceSystemServer</commonModules>
|
||||
<commonModules>CommonModule.SessionParametersServer</commonModules>
|
||||
<commonModules>CommonModule.SimpleBatchCostCalculationServer</commonModules>
|
||||
<commonModules>CommonModule.SMSServer</commonModules>
|
||||
<commonModules>CommonModule.SourceOfOriginClient</commonModules>
|
||||
<commonModules>CommonModule.SourceOfOriginClientServer</commonModules>
|
||||
@@ -846,6 +854,10 @@
|
||||
<commonModules>CommonModule.UniqueID</commonModules>
|
||||
<commonModules>CommonModule.UniqueIDReuse</commonModules>
|
||||
<commonModules>CommonModule.UniversalPrintServer</commonModules>
|
||||
<commonModules>CommonModule.UpdateManagerClient</commonModules>
|
||||
<commonModules>CommonModule.UpdateManagerInitialServer</commonModules>
|
||||
<commonModules>CommonModule.UpdateManagerReleaseServer</commonModules>
|
||||
<commonModules>CommonModule.UpdateManagerServer</commonModules>
|
||||
<commonModules>CommonModule.UserSettingsClientServer</commonModules>
|
||||
<commonModules>CommonModule.UserSettingsServer</commonModules>
|
||||
<commonModules>CommonModule.UserSettingsServerReuse</commonModules>
|
||||
@@ -855,16 +867,6 @@
|
||||
<commonModules>CommonModule.ViewServer_V2</commonModules>
|
||||
<commonModules>CommonModule.WorkstationClient</commonModules>
|
||||
<commonModules>CommonModule.WorkstationServer</commonModules>
|
||||
<commonModules>CommonModule.UpdateManagerServer</commonModules>
|
||||
<commonModules>CommonModule.UpdateManagerClient</commonModules>
|
||||
<commonModules>CommonModule.UpdateManagerInitialServer</commonModules>
|
||||
<commonModules>CommonModule.UpdateManagerReleaseServer</commonModules>
|
||||
<commonModules>CommonModule.SimpleBatchCostCalculationServer</commonModules>
|
||||
<commonModules>CommonModule.DocFixedAssetRevaluationClient</commonModules>
|
||||
<commonModules>CommonModule.DocFixedAssetRevaluationServer</commonModules>
|
||||
<commonModules>CommonModule.BusinessProcessesServer</commonModules>
|
||||
<commonModules>CommonModule.LoggerServerCall</commonModules>
|
||||
<commonModules>CommonModule.LandedCostServer2</commonModules>
|
||||
<commonAttributes>CommonAttribute.Author</commonAttributes>
|
||||
<commonAttributes>CommonAttribute.Branch</commonAttributes>
|
||||
<commonAttributes>CommonAttribute.Comment</commonAttributes>
|
||||
@@ -1215,6 +1217,7 @@
|
||||
<catalogs>Catalog.EmployeePositions</catalogs>
|
||||
<catalogs>Catalog.EmployeeSchedule</catalogs>
|
||||
<catalogs>Catalog.EquipmentDrivers</catalogs>
|
||||
<catalogs>Catalog.ExecutionTemplates</catalogs>
|
||||
<catalogs>Catalog.ExpenseAndRevenueTypes</catalogs>
|
||||
<catalogs>Catalog.ExtDimensions</catalogs>
|
||||
<catalogs>Catalog.Extensions</catalogs>
|
||||
@@ -1286,7 +1289,6 @@
|
||||
<catalogs>Catalog.Vehicles</catalogs>
|
||||
<catalogs>Catalog.VehicleTypes</catalogs>
|
||||
<catalogs>Catalog.Workstations</catalogs>
|
||||
<catalogs>Catalog.ExecutionTemplates</catalogs>
|
||||
<documents>Document.AdditionalAccrual</documents>
|
||||
<documents>Document.AdditionalCostAllocation</documents>
|
||||
<documents>Document.AdditionalDeduction</documents>
|
||||
@@ -1596,6 +1598,7 @@
|
||||
<dataProcessors>DataProcessor.SimpleBatchSequence</dataProcessors>
|
||||
<dataProcessors>DataProcessor.Chat</dataProcessors>
|
||||
<informationRegisters>InformationRegister.AddProperties</informationRegisters>
|
||||
<informationRegisters>InformationRegister.AppliedDatabaseUpdates</informationRegisters>
|
||||
<informationRegisters>InformationRegister.AttachedFiles</informationRegisters>
|
||||
<informationRegisters>InformationRegister.AttachedFilesControl</informationRegisters>
|
||||
<informationRegisters>InformationRegister.AuditLock</informationRegisters>
|
||||
@@ -1616,6 +1619,8 @@
|
||||
<informationRegisters>InformationRegister.DELETE_T2012S_AdvancesCurrencyRevaluation</informationRegisters>
|
||||
<informationRegisters>InformationRegister.DELETE_T8010S_ConsignorBatches</informationRegisters>
|
||||
<informationRegisters>InformationRegister.DocumentFiscalStatus</informationRegisters>
|
||||
<informationRegisters>InformationRegister.ExecutionProcessStatus</informationRegisters>
|
||||
<informationRegisters>InformationRegister.ExecutionResults</informationRegisters>
|
||||
<informationRegisters>InformationRegister.ExpenseRevenueTypeSettings</informationRegisters>
|
||||
<informationRegisters>InformationRegister.ExternalCommands</informationRegisters>
|
||||
<informationRegisters>InformationRegister.FilePartsForUpload</informationRegisters>
|
||||
@@ -1626,6 +1631,9 @@
|
||||
<informationRegisters>InformationRegister.JobQueue</informationRegisters>
|
||||
<informationRegisters>InformationRegister.LedgerTypeOperations</informationRegisters>
|
||||
<informationRegisters>InformationRegister.LockDataModificationRules</informationRegisters>
|
||||
<informationRegisters>InformationRegister.Logger</informationRegisters>
|
||||
<informationRegisters>InformationRegister.LoggerFiles</informationRegisters>
|
||||
<informationRegisters>InformationRegister.LoggerNotification</informationRegisters>
|
||||
<informationRegisters>InformationRegister.MessagesQueueToSend</informationRegisters>
|
||||
<informationRegisters>InformationRegister.NumeratorCounters</informationRegisters>
|
||||
<informationRegisters>InformationRegister.ObjectsPrintTemplates</informationRegisters>
|
||||
@@ -1638,6 +1646,7 @@
|
||||
<informationRegisters>InformationRegister.RemainingItemsInfo</informationRegisters>
|
||||
<informationRegisters>InformationRegister.RetailWorkers</informationRegisters>
|
||||
<informationRegisters>InformationRegister.S1001L_VendorsPricesByItemKey</informationRegisters>
|
||||
<informationRegisters>InformationRegister.SecureDataStorage</informationRegisters>
|
||||
<informationRegisters>InformationRegister.SharedReportOptions</informationRegisters>
|
||||
<informationRegisters>InformationRegister.SystemAttributes</informationRegisters>
|
||||
<informationRegisters>InformationRegister.T1010S_ScannedBarcode</informationRegisters>
|
||||
@@ -1649,6 +1658,7 @@
|
||||
<informationRegisters>InformationRegister.T2016S_VendorsAdvancesRelevance</informationRegisters>
|
||||
<informationRegisters>InformationRegister.T2017S_CustomersAdvancesRelevance</informationRegisters>
|
||||
<informationRegisters>InformationRegister.T3010S_RowIDInfo</informationRegisters>
|
||||
<informationRegisters>InformationRegister.T4050_StockInventoryInfo</informationRegisters>
|
||||
<informationRegisters>InformationRegister.T6010S_BatchesInfo</informationRegisters>
|
||||
<informationRegisters>InformationRegister.T6020S_BatchKeysInfo</informationRegisters>
|
||||
<informationRegisters>InformationRegister.T6030S_BatchRelevance</informationRegisters>
|
||||
@@ -1682,6 +1692,7 @@
|
||||
<informationRegisters>InformationRegister.T9066S_AccountingMappingExtDimensionRefValues</informationRegisters>
|
||||
<informationRegisters>InformationRegister.T9067S_AccountingMappingExtDimensionEnumValues</informationRegisters>
|
||||
<informationRegisters>InformationRegister.T9068S_AccountingMappingAccountsMatching</informationRegisters>
|
||||
<informationRegisters>InformationRegister.T9069S_AccountingMappingRecordersDescription</informationRegisters>
|
||||
<informationRegisters>InformationRegister.T9070S_ELedgerDetailComments</informationRegisters>
|
||||
<informationRegisters>InformationRegister.T9100A_ObjectAccessMap</informationRegisters>
|
||||
<informationRegisters>InformationRegister.T9101A_ObjectAccessRegisters</informationRegisters>
|
||||
@@ -1692,20 +1703,12 @@
|
||||
<informationRegisters>InformationRegister.T9540S_EmployeeVacations</informationRegisters>
|
||||
<informationRegisters>InformationRegister.T9545S_VacationDaysLimits</informationRegisters>
|
||||
<informationRegisters>InformationRegister.T9550S_EmployeeSickLeave</informationRegisters>
|
||||
<informationRegisters>InformationRegister.TaskExecutors</informationRegisters>
|
||||
<informationRegisters>InformationRegister.Taxes</informationRegisters>
|
||||
<informationRegisters>InformationRegister.TaxSettings</informationRegisters>
|
||||
<informationRegisters>InformationRegister.TemplateActions</informationRegisters>
|
||||
<informationRegisters>InformationRegister.TranformedObjectsLink</informationRegisters>
|
||||
<informationRegisters>InformationRegister.UserSettings</informationRegisters>
|
||||
<informationRegisters>InformationRegister.T9069S_AccountingMappingRecordersDescription</informationRegisters>
|
||||
<informationRegisters>InformationRegister.AppliedDatabaseUpdates</informationRegisters>
|
||||
<informationRegisters>InformationRegister.TaskExecutors</informationRegisters>
|
||||
<informationRegisters>InformationRegister.ExecutionResults</informationRegisters>
|
||||
<informationRegisters>InformationRegister.ExecutionProcessStatus</informationRegisters>
|
||||
<informationRegisters>InformationRegister.Logger</informationRegisters>
|
||||
<informationRegisters>InformationRegister.LoggerNotification</informationRegisters>
|
||||
<informationRegisters>InformationRegister.LoggerFiles</informationRegisters>
|
||||
<informationRegisters>InformationRegister.T4050_StockInventoryInfo</informationRegisters>
|
||||
<accumulationRegisters>AccumulationRegister.CashInTransit</accumulationRegisters>
|
||||
<accumulationRegisters>AccumulationRegister.DELETE_R8010B_TradeAgentInventory</accumulationRegisters>
|
||||
<accumulationRegisters>AccumulationRegister.DELETE_R8011B_TradeAgentSerialLotNumber</accumulationRegisters>
|
||||
|
@@ -28,6 +28,11 @@ Procedure FillTree()
|
||||
NewRow.Name = MetaRow.Key;
|
||||
|
||||
For Each ObRow In Metadata[MetaRow.Key] Do
|
||||
|
||||
If ObRow = Metadata.InformationRegisters.SecureDataStorage Then
|
||||
Continue;
|
||||
EndIf;
|
||||
|
||||
AddRow = NewRow.GetItems().Add();
|
||||
AddRow.Name = ObRow.Name;
|
||||
|
||||
@@ -68,7 +73,7 @@ Procedure SaveSettingsAtServer()
|
||||
DataHistorySet.Use = MetaRow.Use;
|
||||
|
||||
DataHistory.SetSettings(Metadata[Row.Name][MetaRow.Name], DataHistorySet);
|
||||
Else
|
||||
Else
|
||||
DataHistory.SetSettings(Metadata[Row.Name][MetaRow.Name], Undefined);
|
||||
EndIf;
|
||||
|
||||
|
@@ -0,0 +1,13 @@
|
||||
#Region AccessObject
|
||||
|
||||
// Get access key.
|
||||
// See Role.TemplateInformationRegisters
|
||||
//
|
||||
// Returns:
|
||||
// Structure - Get access key:
|
||||
Function GetAccessKey() Export
|
||||
AccessKeyStructure = New Structure;
|
||||
Return AccessKeyStructure;
|
||||
EndFunction
|
||||
|
||||
#EndRegion
|
@@ -0,0 +1,59 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<mdclass:InformationRegister xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:core="http://g5.1c.ru/v8/dt/mcore" xmlns:mdclass="http://g5.1c.ru/v8/dt/metadata/mdclass" uuid="d42ab9af-cd0b-4235-b401-6020d1189c71">
|
||||
<producedTypes>
|
||||
<selectionType typeId="42f0f10b-d585-44b5-a2fd-54109d8c06c7" valueTypeId="8c1daba2-6958-4a15-b221-819abe51a5a7"/>
|
||||
<listType typeId="441a9c68-b8e8-4d7c-aaba-16a5db211a51" valueTypeId="921cda4e-d647-4419-ac53-b7c9492df508"/>
|
||||
<managerType typeId="ad83252d-7b78-49e0-ac55-fb7ac9e33821" valueTypeId="ecc7b717-5b78-40f6-bc97-69e0b5e9a825"/>
|
||||
<recordSetType typeId="a520c2c8-3c21-4ef4-acf0-9cd48b7f775e" valueTypeId="182c1677-7cb0-408d-92c6-a9f3bed267be"/>
|
||||
<recordKeyType typeId="58a306d5-bbb0-4ade-8b79-6b8ac7c7d07d" valueTypeId="c2b89895-6344-47c7-9960-a8b361283e06"/>
|
||||
<recordType typeId="53d88a42-b3a2-4700-b986-27f876bc3ea9" valueTypeId="32e8c73d-bf5a-43bd-88e5-9800c82d679e"/>
|
||||
<recordManagerType typeId="869c7d4f-0712-40d2-b480-78584cdb0a9d" valueTypeId="c59c3b35-f115-43e7-90c1-9513960d4b18"/>
|
||||
</producedTypes>
|
||||
<name>SecureDataStorage</name>
|
||||
<synonym>
|
||||
<key>en</key>
|
||||
<value>Secure data storage</value>
|
||||
</synonym>
|
||||
<editType>InDialog</editType>
|
||||
<dataLockControlMode>Managed</dataLockControlMode>
|
||||
<recordPresentation>
|
||||
<key>en</key>
|
||||
<value>Secure data storage</value>
|
||||
</recordPresentation>
|
||||
<resources uuid="f056bd39-d1bc-4c36-9916-977dd69e278f">
|
||||
<name>Data</name>
|
||||
<synonym>
|
||||
<key>en</key>
|
||||
<value>Data</value>
|
||||
</synonym>
|
||||
<type>
|
||||
<types>ValueStorage</types>
|
||||
</type>
|
||||
<minValue xsi:type="core:UndefinedValue"/>
|
||||
<maxValue xsi:type="core:UndefinedValue"/>
|
||||
<fullTextSearch>Use</fullTextSearch>
|
||||
<dataHistory>Use</dataHistory>
|
||||
<fillValue xsi:type="core:UndefinedValue"/>
|
||||
</resources>
|
||||
<dimensions uuid="14c2319c-4731-4710-ade0-23122a6f8a3e">
|
||||
<name>Owner</name>
|
||||
<synonym>
|
||||
<key>en</key>
|
||||
<value>Owner</value>
|
||||
</synonym>
|
||||
<type>
|
||||
<types>String</types>
|
||||
<types>ExchangePlanRef</types>
|
||||
<types>CatalogRef</types>
|
||||
<stringQualifiers>
|
||||
<length>256</length>
|
||||
</stringQualifiers>
|
||||
</type>
|
||||
<minValue xsi:type="core:UndefinedValue"/>
|
||||
<maxValue xsi:type="core:UndefinedValue"/>
|
||||
<fullTextSearch>Use</fullTextSearch>
|
||||
<dataHistory>Use</dataHistory>
|
||||
<fillValue xsi:type="core:UndefinedValue"/>
|
||||
<mainFilter>true</mainFilter>
|
||||
</dimensions>
|
||||
</mdclass:InformationRegister>
|
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<mdclass:Role xmlns:mdclass="http://g5.1c.ru/v8/dt/metadata/mdclass" uuid="bbeb8bd0-d007-4912-922c-95fbf3fc5609">
|
||||
<name>AdminAccessToSecureStorage</name>
|
||||
<synonym>
|
||||
<key>en</key>
|
||||
<value>Admin access to secure storage</value>
|
||||
</synonym>
|
||||
</mdclass:Role>
|
104
IRP/src/Roles/AdminAccessToSecureStorage/Rights.rights
Normal file
104
IRP/src/Roles/AdminAccessToSecureStorage/Rights.rights
Normal file
@@ -0,0 +1,104 @@
|
||||
<?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>InformationRegister.SecureDataStorage</name>
|
||||
<right>
|
||||
<name>Read</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>Update</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>View</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>Edit</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>TotalsControl</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>ReadDataHistory</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>ReadDataHistoryOfMissingData</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>UpdateDataHistory</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>UpdateDataHistoryOfMissingData</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>UpdateDataHistorySettings</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>UpdateDataHistoryVersionComment</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>ViewDataHistory</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>EditDataHistoryVersionComment</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>SwitchToDataHistoryVersion</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
</object>
|
||||
<object>
|
||||
<name>Configuration.IRP</name>
|
||||
<right>
|
||||
<name>ThinClient</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>WebClient</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>MainWindowModeNormal</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>MainWindowModeWorkplace</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>MainWindowModeEmbeddedWorkplace</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>MainWindowModeFullscreenWorkplace</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>MainWindowModeKiosk</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>AnalyticsSystemClient</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>SaveUserData</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
</object>
|
||||
</Rights>
|
@@ -2044,6 +2044,16 @@
|
||||
<value>true</value>
|
||||
</right>
|
||||
</object>
|
||||
<object>
|
||||
<name>InformationRegister.SecureDataStorage</name>
|
||||
<right>
|
||||
<name>Read</name>
|
||||
<value>true</value>
|
||||
<restrictionByCondition>
|
||||
<condition>WHERE FALSE</condition>
|
||||
</restrictionByCondition>
|
||||
</right>
|
||||
</object>
|
||||
<object>
|
||||
<name>CommonAttribute.Description_en</name>
|
||||
<right>
|
||||
|
@@ -2619,6 +2619,68 @@
|
||||
<value>false</value>
|
||||
</right>
|
||||
</object>
|
||||
<object>
|
||||
<name>InformationRegister.SecureDataStorage</name>
|
||||
<right>
|
||||
<name>Read</name>
|
||||
<value>true</value>
|
||||
<restrictionByCondition>
|
||||
<condition>WHERE FALSE</condition>
|
||||
</restrictionByCondition>
|
||||
</right>
|
||||
<right>
|
||||
<name>Update</name>
|
||||
<value>false</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>View</name>
|
||||
<value>false</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>Edit</name>
|
||||
<value>false</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>TotalsControl</name>
|
||||
<value>false</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>ReadDataHistory</name>
|
||||
<value>false</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>ReadDataHistoryOfMissingData</name>
|
||||
<value>false</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>UpdateDataHistory</name>
|
||||
<value>false</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>UpdateDataHistoryOfMissingData</name>
|
||||
<value>false</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>UpdateDataHistorySettings</name>
|
||||
<value>false</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>UpdateDataHistoryVersionComment</name>
|
||||
<value>false</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>ViewDataHistory</name>
|
||||
<value>false</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>EditDataHistoryVersionComment</name>
|
||||
<value>false</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>SwitchToDataHistoryVersion</name>
|
||||
<value>false</value>
|
||||
</right>
|
||||
</object>
|
||||
<object>
|
||||
<name>Catalog.ItemTypes</name>
|
||||
<right>
|
||||
|
@@ -2652,6 +2652,68 @@
|
||||
<value>false</value>
|
||||
</right>
|
||||
</object>
|
||||
<object>
|
||||
<name>InformationRegister.SecureDataStorage</name>
|
||||
<right>
|
||||
<name>Read</name>
|
||||
<value>true</value>
|
||||
<restrictionByCondition>
|
||||
<condition>WHERE FALSE</condition>
|
||||
</restrictionByCondition>
|
||||
</right>
|
||||
<right>
|
||||
<name>Update</name>
|
||||
<value>false</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>View</name>
|
||||
<value>false</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>Edit</name>
|
||||
<value>false</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>TotalsControl</name>
|
||||
<value>false</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>ReadDataHistory</name>
|
||||
<value>false</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>ReadDataHistoryOfMissingData</name>
|
||||
<value>false</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>UpdateDataHistory</name>
|
||||
<value>false</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>UpdateDataHistoryOfMissingData</name>
|
||||
<value>false</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>UpdateDataHistorySettings</name>
|
||||
<value>false</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>UpdateDataHistoryVersionComment</name>
|
||||
<value>false</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>ViewDataHistory</name>
|
||||
<value>false</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>EditDataHistoryVersionComment</name>
|
||||
<value>false</value>
|
||||
</right>
|
||||
<right>
|
||||
<name>SwitchToDataHistoryVersion</name>
|
||||
<value>false</value>
|
||||
</right>
|
||||
</object>
|
||||
<object>
|
||||
<name>Catalog.ItemTypes</name>
|
||||
<right>
|
||||
|
@@ -2607,6 +2607,9 @@
|
||||
<right>
|
||||
<name>Read</name>
|
||||
<value>true</value>
|
||||
<restrictionByCondition>
|
||||
<condition>WHERE FALSE</condition>
|
||||
</restrictionByCondition>
|
||||
</right>
|
||||
<right>
|
||||
<name>View</name>
|
||||
@@ -14055,6 +14058,13 @@
|
||||
<value>false</value>
|
||||
</right>
|
||||
</object>
|
||||
<object>
|
||||
<name>InformationRegister.SecureDataStorage</name>
|
||||
<right>
|
||||
<name>Read</name>
|
||||
<value>true</value>
|
||||
</right>
|
||||
</object>
|
||||
<object>
|
||||
<name>InformationRegister.T2017S_CustomersAdvancesRelevance.Resource.IsRelevance</name>
|
||||
<right>
|
||||
|
@@ -2,7 +2,13 @@
|
||||
#Region Public
|
||||
|
||||
&Around("SendRequestClientServer")
|
||||
Function Unit_SendRequestClientServer(ConnectionSetting, ResourceParameters, RequestParameters, RequestBody, EndPoint, AddInfo)
|
||||
Function Unit_SendRequestClientServer(ConnectionSettingData, ResourceParameters, RequestParameters, RequestBody, EndPoint, AddInfo)
|
||||
|
||||
If TypeOf(ConnectionSettingData) = Type("Structure") And ConnectionSettingData.Property("Value") Then
|
||||
ConnectionSetting = ConnectionSettingData.Value;
|
||||
Else
|
||||
ConnectionSetting = ConnectionSettingData;
|
||||
EndIf;
|
||||
|
||||
isNeedingToSaveExchange = CommonFunctionsServer.GetRefAttribute(ConnectionSetting.IntegrationSettingsRef, "Unit_SaveExchangeHistory");
|
||||
|
||||
|
@@ -448,6 +448,11 @@ Function InformationRegisters() Export
|
||||
ArrayOfErrors = New Array();
|
||||
|
||||
For Each MetaObj In Metadata.InformationRegisters Do
|
||||
|
||||
If MetaObj = Metadata.InformationRegisters.SecureDataStorage Then
|
||||
Continue;
|
||||
EndIf;
|
||||
|
||||
Try
|
||||
InformationRegisters[MetaObj.Name].GetAccessKey();
|
||||
Except
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#language: en
|
||||
#language: en
|
||||
@tree
|
||||
@Positive
|
||||
@LoadInfo
|
||||
@@ -146,7 +146,7 @@ Scenario: _020000 preparation (Loadinfo)
|
||||
| 'Description' |
|
||||
| 'Bank UA' |
|
||||
And I select current line in "List" table
|
||||
And in the table "ConnectionSetting" I click "Test" button
|
||||
And I click "Test" button
|
||||
// Given Recent TestClient message contains "Received response from bank.gov.ua:443 Status code: 200" string
|
||||
And Delay 80
|
||||
And I close all client application windows
|
||||
|
Reference in New Issue
Block a user