Merge pull request #2244 from tecxx/develop-orig

save RCG and RestrictedAdmin fields correctly in connections file
This commit is contained in:
Dimitrij
2022-06-11 11:30:26 +01:00
committed by GitHub
5 changed files with 32 additions and 5 deletions

View File

@@ -151,6 +151,9 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Xml
? new XAttribute("RDGatewayDomain", connectionInfo.RDGatewayDomain)
: new XAttribute("RDGatewayDomain", ""));
element.Add(new XAttribute("UseRCG", connectionInfo.UseRCG));
element.Add(new XAttribute("UseRestrictedAdmin", connectionInfo.UseRestrictedAdmin));
element.Add(new XAttribute("UserViaAPI", connectionInfo.UserViaAPI));
element.Add(new XAttribute("EC2InstanceId", connectionInfo.EC2InstanceId));
element.Add(new XAttribute("EC2Region", connectionInfo.EC2Region));
@@ -298,6 +301,10 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Xml
element.Add(new XAttribute("InheritUseEnhancedMode", inheritance.UseEnhancedMode.ToString().ToLowerInvariant()));
if (inheritance.UserViaAPI)
element.Add(new XAttribute("InheritUserViaAPI", inheritance.UserViaAPI.ToString().ToLowerInvariant()));
if (inheritance.UseRCG)
element.Add(new XAttribute("InheritUseRCG", inheritance.UseRCG.ToString().ToLowerInvariant()));
if (inheritance.UseRestrictedAdmin)
element.Add(new XAttribute("InheritUseRestrictedAdmin", inheritance.UseRestrictedAdmin.ToString().ToLowerInvariant()));
}
}
}

View File

@@ -47,6 +47,21 @@ namespace mRemoteNG.Config.Settings
SaveQuickConnectToolbarLocation(quickConnectToolStrip);
SaveMultiSshToolbarLocation(multiSshToolStrip);
Properties.App.Default.Save();
Properties.AppUI.Default.Save();
Properties.OptionsAdvancedPage.Default.Save();
Properties.OptionsAppearancePage.Default.Save();
Properties.OptionsBackupPage.Default.Save();
Properties.OptionsConnectionsPage.Default.Save();
Properties.OptionsCredentialsPage.Default.Save();
Properties.OptionsDBsPage.Default.Save();
Properties.OptionsNotificationsPage.Default.Save();
Properties.OptionsSecurityPage.Default.Save();
Properties.OptionsStartupExitPage.Default.Save();
Properties.OptionsTabsPanelsPage.Default.Save();
Properties.OptionsThemePage.Default.Save();
Properties.OptionsUpdatesPage.Default.Save();
Properties.Settings.Default.Save();
SaveDockPanelLayout();

View File

@@ -12,7 +12,7 @@ namespace mRemoteNG.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.1.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.2.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
@@ -1405,7 +1405,7 @@ namespace mRemoteNG.Properties {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool ConDefaultUseRestrictedAdmin {
get {
return ((bool)(this["ConDefaultUseRestrictedAdmin"]));
@@ -1429,7 +1429,7 @@ namespace mRemoteNG.Properties {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool ConDefaultUseRCG {
get {
return ((bool)(this["ConDefaultUseRCG"]));

View File

@@ -348,13 +348,13 @@
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="ConDefaultUseRestrictedAdmin" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="InhDefaultUseRCG" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="ConDefaultUseRCG" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="ConDefaultUseVmId" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>

View File

@@ -175,5 +175,10 @@
<xs:attribute name="UserViaAPI" type="xs:string" use="optional" />
<xs:attribute name="EC2InstanceId" type="xs:string" use="optional" />
<xs:attribute name="EC2Region" type="xs:string" use="optional" />
<xs:attribute name="UseRCG" type="xs:boolean" use="optional" />
<xs:attribute name="UseRestrictedAdmin" type="xs:boolean" use="optional" />
<xs:attribute name="InheritUseRCG" type="xs:boolean" use="optional" />
<xs:attribute name="InheritUseRestrictedAdmin" type="xs:boolean" use="optional" />
</xs:complexType>
</xs:schema>