mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2025-01-21 07:49:32 +01:00
Merge pull request #2719 from kc284/feature/REQ-819
Resolve conflicts and merge feature/REQ-819 into master
This commit is contained in:
commit
6a412d4a10
@ -29,13 +29,9 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using XenAdmin.Network;
|
||||
using XenAPI;
|
||||
using XenAdmin.Dialogs;
|
||||
using System.Collections.ObjectModel;
|
||||
using XenAPI;
|
||||
|
||||
|
||||
namespace XenAdmin.Commands
|
||||
@ -58,72 +54,38 @@ namespace XenAdmin.Commands
|
||||
{
|
||||
}
|
||||
|
||||
public ChangeHostPasswordCommand(IMainWindow mainWindow, Host host)
|
||||
: base(mainWindow, host)
|
||||
{
|
||||
}
|
||||
|
||||
public ChangeHostPasswordCommand(IMainWindow mainWindow, Pool pool)
|
||||
: base(mainWindow, pool)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void ExecuteCore(SelectedItemCollection selection)
|
||||
{
|
||||
Host host = selection[0].XenObject as Host;
|
||||
Pool pool = selection[0].XenObject as Pool;
|
||||
|
||||
if (host != null)
|
||||
MainWindowCommandInterface.ShowPerConnectionWizard(selection[0].Connection, new ChangeServerPasswordDialog(host));
|
||||
if (pool != null)
|
||||
MainWindowCommandInterface.ShowPerConnectionWizard(selection[0].Connection, new ChangeServerPasswordDialog(pool));
|
||||
if (selection[0].XenObject is Host host)
|
||||
MainWindowCommandInterface.ShowPerConnectionWizard(host.Connection, new ChangeServerPasswordDialog(host));
|
||||
else if (selection[0].XenObject is Pool pool)
|
||||
MainWindowCommandInterface.ShowPerConnectionWizard(pool.Connection, new ChangeServerPasswordDialog(pool));
|
||||
}
|
||||
|
||||
protected override bool CanExecuteCore(SelectedItemCollection selection)
|
||||
{
|
||||
// Only allow password change if the user is logged in as local root
|
||||
// (i.e. disallow password change if the user is logged in via AD)
|
||||
|
||||
if (selection.Count == 1)
|
||||
{
|
||||
IXenConnection connection = selection[0].Connection;
|
||||
Host host = selection[0].XenObject as Host;
|
||||
Pool pool = selection[0].XenObject as Pool;
|
||||
Session session = connection != null ? connection.Session : null;
|
||||
var session = selection[0].Connection?.Session;
|
||||
|
||||
if (host != null)
|
||||
return host.IsLive() && session != null && session.IsLocalSuperuser;
|
||||
if (pool != null)
|
||||
return session != null && session.IsLocalSuperuser;
|
||||
if (session != null && session.IsLocalSuperuser)
|
||||
return selection[0].XenObject is Host host && host.IsLive() || selection[0].XenObject is Pool;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override string ToolTipText
|
||||
protected override string GetCantExecuteReasonCore(IXenObject item)
|
||||
{
|
||||
get
|
||||
{
|
||||
ReadOnlyCollection<SelectedItem> selection = GetSelection();
|
||||
var session = item.Connection?.Session;
|
||||
|
||||
if (selection.Count == 1)
|
||||
{
|
||||
IXenConnection connection = selection[0].Connection;
|
||||
|
||||
// Only allow password change if the user is logged in as local root
|
||||
// (i.e. disallow password change if the user is logged in via AD)
|
||||
|
||||
Host host = selection[0].XenObject as Host;
|
||||
Pool pool = selection[0].XenObject as Pool;
|
||||
|
||||
if (host != null && host.IsLive() && connection.Session != null && !connection.Session.IsLocalSuperuser)
|
||||
{
|
||||
return Messages.AD_CANNOT_CHANGE_PASSWORD;
|
||||
}
|
||||
|
||||
if (pool != null && connection.Session != null && !connection.Session.IsLocalSuperuser)
|
||||
{
|
||||
return Messages.AD_CANNOT_CHANGE_PASSWORD;
|
||||
}
|
||||
}
|
||||
return string.Empty;
|
||||
}
|
||||
if (session != null && !session.IsLocalSuperuser && (item is Host host && host.IsLive() || item is Pool))
|
||||
return Messages.AD_CANNOT_CHANGE_PASSWORD;
|
||||
|
||||
return base.GetCantExecuteReasonCore(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
107
XenAdmin/Commands/RotatePoolSecretCommand.cs
Normal file
107
XenAdmin/Commands/RotatePoolSecretCommand.cs
Normal file
@ -0,0 +1,107 @@
|
||||
/* Copyright (c) Citrix Systems, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms,
|
||||
* with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above
|
||||
* copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the
|
||||
* following disclaimer in the documentation and/or other
|
||||
* materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
|
||||
using System.Linq;
|
||||
using XenAdmin.Actions;
|
||||
using XenAdmin.Core;
|
||||
using XenAdmin.Dialogs;
|
||||
using XenAPI;
|
||||
|
||||
|
||||
namespace XenAdmin.Commands
|
||||
{
|
||||
class RotatePoolSecretCommand : Command
|
||||
{
|
||||
protected override void ExecuteCore(SelectedItemCollection selection)
|
||||
{
|
||||
var connection = selection.GetConnectionOfFirstItem();
|
||||
|
||||
if (connection != null && !connection.Session.IsLocalSuperuser && !Registry.DontSudo &&
|
||||
connection.Session.Roles.All(r => r.name_label != Role.MR_ROLE_POOL_ADMIN))
|
||||
{
|
||||
var currentRoles = connection.Session.Roles;
|
||||
currentRoles.Sort();
|
||||
|
||||
var msg = string.Format(Messages.ROTATE_POOL_SECRET_RBAC_RESTRICTION, currentRoles[0].FriendlyName(),
|
||||
Role.FriendlyName(Role.MR_ROLE_POOL_ADMIN));
|
||||
|
||||
using (var dlg = new ErrorDialog(msg))
|
||||
dlg.ShowDialog(Parent);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (Properties.Settings.Default.RemindChangePassword)
|
||||
using (var dlg = new InformationDialog(Messages.ROTATE_POOL_SECRET_REMIND_CHANGE_PASSWORD)
|
||||
{ShowCheckbox = true, CheckboxCaption = Messages.DO_NOT_SHOW_THIS_MESSAGE})
|
||||
{
|
||||
dlg.ShowDialog(Parent);
|
||||
Properties.Settings.Default.RemindChangePassword = !dlg.IsCheckBoxChecked;
|
||||
}
|
||||
|
||||
new DelegatedAsyncAction(connection, Messages.ROTATE_POOL_SECRET_TITLE,
|
||||
Messages.ROTATE_POOL_SECRET_TITLE, Messages.COMPLETED,
|
||||
Pool.rotate_secret, "pool.rotate_secret").RunAsync();
|
||||
}
|
||||
|
||||
protected override bool CanExecuteCore(SelectedItemCollection selection)
|
||||
{
|
||||
if (selection.Any(i => !(i.XenObject is Host) && !(i.XenObject is Pool)))
|
||||
return false;
|
||||
|
||||
var conn = selection.GetConnectionOfAllItems();
|
||||
if (conn == null || !Helpers.StockholmOrGreater(conn) || conn.Cache.Hosts.Any(Host.RestrictPoolSecretRotation))
|
||||
return false;
|
||||
|
||||
var pool = Helpers.GetPoolOfOne(conn);
|
||||
return pool != null && !pool.ha_enabled && !pool.RollingUpgrade();
|
||||
}
|
||||
|
||||
protected override string GetCantExecuteReasonCore(IXenObject item)
|
||||
{
|
||||
var pool = item == null ? null : Helpers.GetPoolOfOne(item.Connection);
|
||||
|
||||
if (pool != null)
|
||||
{
|
||||
if (pool.ha_enabled)
|
||||
return Messages.ROTATE_POOL_SECRET_HA;
|
||||
|
||||
if (pool.RollingUpgrade())
|
||||
return Messages.ROTATE_POOL_SECRET_RPU;
|
||||
}
|
||||
|
||||
return base.GetCantExecuteReasonCore(item);
|
||||
}
|
||||
|
||||
public override string MenuText => Messages.ROTATE_POOL_SECRET_MENU;
|
||||
}
|
||||
}
|
@ -38,11 +38,19 @@ namespace XenAdmin.Dialogs
|
||||
this.cancelButton = new System.Windows.Forms.Button();
|
||||
this.okButton = new System.Windows.Forms.Button();
|
||||
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.ServerNameLabel = new System.Windows.Forms.Label();
|
||||
this.currentPasswordError = new XenAdmin.Controls.Common.PasswordFailure();
|
||||
this.newPasswordError = new XenAdmin.Controls.Common.PasswordFailure();
|
||||
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.noteLabel = new System.Windows.Forms.Label();
|
||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.pictureBox2 = new System.Windows.Forms.PictureBox();
|
||||
this.tableLayoutPanel1.SuspendLayout();
|
||||
this.tableLayoutPanel2.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
this.tableLayoutPanel3.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// OldPasswordLabel
|
||||
@ -102,26 +110,20 @@ namespace XenAdmin.Dialogs
|
||||
// tableLayoutPanel1
|
||||
//
|
||||
resources.ApplyResources(this.tableLayoutPanel1, "tableLayoutPanel1");
|
||||
this.tableLayoutPanel1.Controls.Add(this.ServerNameLabel, 0, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.OldPasswordLabel, 0, 2);
|
||||
this.tableLayoutPanel1.Controls.Add(this.oldPassBox, 1, 2);
|
||||
this.tableLayoutPanel1.Controls.Add(this.NewPasswordLabel, 0, 4);
|
||||
this.tableLayoutPanel1.Controls.Add(this.newPassBox, 1, 4);
|
||||
this.tableLayoutPanel1.Controls.Add(this.RetypeNewPasswordLabel, 0, 5);
|
||||
this.tableLayoutPanel1.Controls.Add(this.confirmBox, 1, 5);
|
||||
this.tableLayoutPanel1.Controls.Add(this.OldPasswordLabel, 0, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.oldPassBox, 1, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.NewPasswordLabel, 0, 2);
|
||||
this.tableLayoutPanel1.Controls.Add(this.newPassBox, 1, 2);
|
||||
this.tableLayoutPanel1.Controls.Add(this.RetypeNewPasswordLabel, 0, 3);
|
||||
this.tableLayoutPanel1.Controls.Add(this.confirmBox, 1, 3);
|
||||
this.tableLayoutPanel1.Controls.Add(this.okButton, 1, 7);
|
||||
this.tableLayoutPanel1.Controls.Add(this.cancelButton, 2, 7);
|
||||
this.tableLayoutPanel1.Controls.Add(this.currentPasswordError, 1, 3);
|
||||
this.tableLayoutPanel1.Controls.Add(this.newPasswordError, 1, 6);
|
||||
this.tableLayoutPanel1.Controls.Add(this.noteLabel, 0, 1);
|
||||
this.tableLayoutPanel1.Controls.Add(this.currentPasswordError, 1, 1);
|
||||
this.tableLayoutPanel1.Controls.Add(this.newPasswordError, 1, 4);
|
||||
this.tableLayoutPanel1.Controls.Add(this.tableLayoutPanel2, 0, 5);
|
||||
this.tableLayoutPanel1.Controls.Add(this.tableLayoutPanel3, 0, 6);
|
||||
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||
//
|
||||
// ServerNameLabel
|
||||
//
|
||||
resources.ApplyResources(this.ServerNameLabel, "ServerNameLabel");
|
||||
this.tableLayoutPanel1.SetColumnSpan(this.ServerNameLabel, 3);
|
||||
this.ServerNameLabel.Name = "ServerNameLabel";
|
||||
//
|
||||
// currentPasswordError
|
||||
//
|
||||
resources.ApplyResources(this.currentPasswordError, "currentPasswordError");
|
||||
@ -134,12 +136,46 @@ namespace XenAdmin.Dialogs
|
||||
this.tableLayoutPanel1.SetColumnSpan(this.newPasswordError, 2);
|
||||
this.newPasswordError.Name = "newPasswordError";
|
||||
//
|
||||
// tableLayoutPanel2
|
||||
//
|
||||
resources.ApplyResources(this.tableLayoutPanel2, "tableLayoutPanel2");
|
||||
this.tableLayoutPanel1.SetColumnSpan(this.tableLayoutPanel2, 3);
|
||||
this.tableLayoutPanel2.Controls.Add(this.noteLabel, 1, 0);
|
||||
this.tableLayoutPanel2.Controls.Add(this.pictureBox1, 0, 0);
|
||||
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
|
||||
//
|
||||
// noteLabel
|
||||
//
|
||||
resources.ApplyResources(this.noteLabel, "noteLabel");
|
||||
this.tableLayoutPanel1.SetColumnSpan(this.noteLabel, 3);
|
||||
this.noteLabel.Name = "noteLabel";
|
||||
//
|
||||
// pictureBox1
|
||||
//
|
||||
resources.ApplyResources(this.pictureBox1, "pictureBox1");
|
||||
this.pictureBox1.Image = global::XenAdmin.Properties.Resources._000_Info3_h32bit_16;
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.TabStop = false;
|
||||
//
|
||||
// tableLayoutPanel3
|
||||
//
|
||||
resources.ApplyResources(this.tableLayoutPanel3, "tableLayoutPanel3");
|
||||
this.tableLayoutPanel1.SetColumnSpan(this.tableLayoutPanel3, 3);
|
||||
this.tableLayoutPanel3.Controls.Add(this.label1, 1, 0);
|
||||
this.tableLayoutPanel3.Controls.Add(this.pictureBox2, 0, 0);
|
||||
this.tableLayoutPanel3.Name = "tableLayoutPanel3";
|
||||
//
|
||||
// label1
|
||||
//
|
||||
resources.ApplyResources(this.label1, "label1");
|
||||
this.label1.Name = "label1";
|
||||
//
|
||||
// pictureBox2
|
||||
//
|
||||
resources.ApplyResources(this.pictureBox2, "pictureBox2");
|
||||
this.pictureBox2.Image = global::XenAdmin.Properties.Resources._000_Info3_h32bit_16;
|
||||
this.pictureBox2.Name = "pictureBox2";
|
||||
this.pictureBox2.TabStop = false;
|
||||
//
|
||||
// ChangeServerPasswordDialog
|
||||
//
|
||||
this.AcceptButton = this.okButton;
|
||||
@ -151,6 +187,12 @@ namespace XenAdmin.Dialogs
|
||||
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
|
||||
this.tableLayoutPanel1.ResumeLayout(false);
|
||||
this.tableLayoutPanel1.PerformLayout();
|
||||
this.tableLayoutPanel2.ResumeLayout(false);
|
||||
this.tableLayoutPanel2.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
this.tableLayoutPanel3.ResumeLayout(false);
|
||||
this.tableLayoutPanel3.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
@ -167,9 +209,13 @@ namespace XenAdmin.Dialogs
|
||||
private System.Windows.Forms.Button cancelButton;
|
||||
private System.Windows.Forms.Button okButton;
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||
private System.Windows.Forms.Label ServerNameLabel;
|
||||
private XenAdmin.Controls.Common.PasswordFailure currentPasswordError;
|
||||
private XenAdmin.Controls.Common.PasswordFailure newPasswordError;
|
||||
private System.Windows.Forms.Label noteLabel;
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
|
||||
private System.Windows.Forms.PictureBox pictureBox1;
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel3;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.PictureBox pictureBox2;
|
||||
}
|
||||
}
|
@ -31,6 +31,7 @@
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using XenAdmin.Actions;
|
||||
using XenAdmin.Core;
|
||||
@ -45,27 +46,19 @@ namespace XenAdmin.Dialogs
|
||||
private readonly Pool pool;
|
||||
|
||||
public ChangeServerPasswordDialog(Host host)
|
||||
: base(host.Connection)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
this.host = host;
|
||||
|
||||
host.PropertyChanged += Server_PropertyChanged;
|
||||
|
||||
UpdateText();
|
||||
UpdateButtons();
|
||||
}
|
||||
|
||||
public ChangeServerPasswordDialog(Pool pool)
|
||||
: base(pool.Connection)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
this.pool = pool;
|
||||
|
||||
pool.PropertyChanged += Server_PropertyChanged;
|
||||
|
||||
UpdateText();
|
||||
UpdateButtons();
|
||||
}
|
||||
|
||||
private void Server_PropertyChanged(object sender, PropertyChangedEventArgs e)
|
||||
@ -91,15 +84,12 @@ namespace XenAdmin.Dialogs
|
||||
if (pool != null)
|
||||
name = pool.Name();
|
||||
|
||||
this.Text = string.Format(Messages.CHANGEPASS_DIALOG_TITLE, name.Ellipsise(30));
|
||||
ServerNameLabel.Text = string.Format(Messages.CHANGEPASS_ROOT_PASS, name.Ellipsise(30));
|
||||
Text = string.Format(Messages.CHANGEPASS_DIALOG_TITLE, name.Ellipsise(30));
|
||||
}
|
||||
|
||||
private void okButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
bool isOldPasswordCorrect = (host == null)
|
||||
? oldPassBox.Text == pool.Connection.Password
|
||||
: oldPassBox.Text == host.Connection.Password;
|
||||
bool isOldPasswordCorrect = connection != null && oldPassBox.Text == connection.Password;
|
||||
|
||||
// Check old password was correct
|
||||
if (!isOldPasswordCorrect)
|
||||
@ -119,10 +109,7 @@ namespace XenAdmin.Dialogs
|
||||
return;
|
||||
}
|
||||
|
||||
ChangeHostPasswordAction action = (host == null)
|
||||
? new ChangeHostPasswordAction(pool.Connection, oldPassBox.Text.ToCharArray(), newPassBox.Text.ToCharArray())
|
||||
: new ChangeHostPasswordAction(host.Connection, oldPassBox.Text.ToCharArray(), newPassBox.Text.ToCharArray());
|
||||
action.RunAsync();
|
||||
new ChangeHostPasswordAction(connection, oldPassBox.Text.ToCharArray(), newPassBox.Text.ToCharArray()).RunAsync();
|
||||
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
@ -134,6 +121,15 @@ namespace XenAdmin.Dialogs
|
||||
Close();
|
||||
}
|
||||
|
||||
protected override void OnLoad(EventArgs e)
|
||||
{
|
||||
base.OnLoad(e);
|
||||
tableLayoutPanel3.Visible = connection != null && Helpers.StockholmOrGreater(connection) &&
|
||||
!connection.Cache.Hosts.Any(Host.RestrictPoolSecretRotation);
|
||||
UpdateText();
|
||||
UpdateButtons();
|
||||
}
|
||||
|
||||
protected override void OnClosing(CancelEventArgs e)
|
||||
{
|
||||
if (host != null)
|
||||
|
@ -130,7 +130,7 @@
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="OldPasswordLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>3, 72</value>
|
||||
<value>3, 7</value>
|
||||
</data>
|
||||
<data name="OldPasswordLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>128, 15</value>
|
||||
@ -151,7 +151,7 @@
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>OldPasswordLabel.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="oldPassBox.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Left, Right</value>
|
||||
@ -165,42 +165,6 @@
|
||||
<data name="tableLayoutPanel1.ColumnCount" type="System.Int32, mscorlib">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="ServerNameLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="ServerNameLabel.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
<data name="ServerNameLabel.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="ServerNameLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name="ServerNameLabel.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>0, 0, 3, 10</value>
|
||||
</data>
|
||||
<data name="ServerNameLabel.MaximumSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>367, 32000</value>
|
||||
</data>
|
||||
<data name="ServerNameLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>367, 15</value>
|
||||
</data>
|
||||
<data name="ServerNameLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>12</value>
|
||||
</data>
|
||||
<data name=">>ServerNameLabel.Name" xml:space="preserve">
|
||||
<value>ServerNameLabel</value>
|
||||
</data>
|
||||
<data name=">>ServerNameLabel.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>ServerNameLabel.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>ServerNameLabel.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="NewPasswordLabel.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Left</value>
|
||||
</data>
|
||||
@ -211,7 +175,7 @@
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="NewPasswordLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>3, 123</value>
|
||||
<value>3, 58</value>
|
||||
</data>
|
||||
<data name="NewPasswordLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>112, 15</value>
|
||||
@ -232,7 +196,7 @@
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>NewPasswordLabel.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="newPassBox.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Left, Right</value>
|
||||
@ -241,7 +205,7 @@
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="newPassBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>142, 119</value>
|
||||
<value>142, 54</value>
|
||||
</data>
|
||||
<data name="newPassBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>244, 23</value>
|
||||
@ -259,7 +223,7 @@
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>newPassBox.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="RetypeNewPasswordLabel.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Left</value>
|
||||
@ -271,7 +235,7 @@
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="RetypeNewPasswordLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>3, 152</value>
|
||||
<value>3, 87</value>
|
||||
</data>
|
||||
<data name="RetypeNewPasswordLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>133, 15</value>
|
||||
@ -292,7 +256,7 @@
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>RetypeNewPasswordLabel.ZOrder" xml:space="preserve">
|
||||
<value>5</value>
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="confirmBox.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Left, Right</value>
|
||||
@ -301,7 +265,7 @@
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="confirmBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>142, 148</value>
|
||||
<value>142, 83</value>
|
||||
</data>
|
||||
<data name="confirmBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>244, 23</value>
|
||||
@ -319,7 +283,7 @@
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>confirmBox.ZOrder" xml:space="preserve">
|
||||
<value>6</value>
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="okButton.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Bottom, Right</value>
|
||||
@ -328,10 +292,10 @@
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="okButton.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>230, 204</value>
|
||||
<value>230, 227</value>
|
||||
</data>
|
||||
<data name="okButton.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>3, 8, 3, 3</value>
|
||||
<value>3, 10, 3, 3</value>
|
||||
</data>
|
||||
<data name="okButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>75, 23</value>
|
||||
@ -352,7 +316,7 @@
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>okButton.ZOrder" xml:space="preserve">
|
||||
<value>7</value>
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="cancelButton.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Bottom, Right</value>
|
||||
@ -361,7 +325,10 @@
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="cancelButton.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>311, 204</value>
|
||||
<value>311, 227</value>
|
||||
</data>
|
||||
<data name="cancelButton.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>3, 10, 3, 3</value>
|
||||
</data>
|
||||
<data name="cancelButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>75, 23</value>
|
||||
@ -382,7 +349,7 @@
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>cancelButton.ZOrder" xml:space="preserve">
|
||||
<value>8</value>
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name="currentPasswordError.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@ -400,7 +367,7 @@
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="currentPasswordError.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>139, 94</value>
|
||||
<value>139, 29</value>
|
||||
</data>
|
||||
<data name="currentPasswordError.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>0, 0, 0, 0</value>
|
||||
@ -424,7 +391,7 @@
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>currentPasswordError.ZOrder" xml:space="preserve">
|
||||
<value>9</value>
|
||||
<value>8</value>
|
||||
</data>
|
||||
<data name="newPasswordError.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@ -442,7 +409,7 @@
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="newPasswordError.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>139, 174</value>
|
||||
<value>139, 109</value>
|
||||
</data>
|
||||
<data name="newPasswordError.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>0, 0, 0, 0</value>
|
||||
@ -466,7 +433,19 @@
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>newPasswordError.ZOrder" xml:space="preserve">
|
||||
<value>10</value>
|
||||
<value>9</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel2.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel2.AutoSizeMode" type="System.Windows.Forms.AutoSizeMode, System.Windows.Forms">
|
||||
<value>GrowAndShrink</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel2.ColumnCount" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="noteLabel.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Left, Right</value>
|
||||
</data>
|
||||
<data name="noteLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@ -478,20 +457,19 @@
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="noteLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>3, 25</value>
|
||||
<value>25, 0</value>
|
||||
</data>
|
||||
<data name="noteLabel.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>3, 0, 3, 10</value>
|
||||
<data name="noteLabel.MaximumSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>355, 9999</value>
|
||||
</data>
|
||||
<data name="noteLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>363, 30</value>
|
||||
<value>355, 30</value>
|
||||
</data>
|
||||
<data name="noteLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>15</value>
|
||||
</data>
|
||||
<data name="noteLabel.Text" xml:space="preserve">
|
||||
<value>Note that if you lose or forget the password, it cannot be recovered.
|
||||
(Remember that passwords are case sensitive).</value>
|
||||
<value>Passwords are case sensitive. If you lose or forget the password, it cannot be recovered.</value>
|
||||
</data>
|
||||
<data name=">>noteLabel.Name" xml:space="preserve">
|
||||
<value>noteLabel</value>
|
||||
@ -500,11 +478,179 @@
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>noteLabel.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanel1</value>
|
||||
<value>tableLayoutPanel2</value>
|
||||
</data>
|
||||
<data name=">>noteLabel.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="pictureBox1.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="pictureBox1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>3, 3</value>
|
||||
</data>
|
||||
<data name="pictureBox1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>16, 16</value>
|
||||
</data>
|
||||
<data name="pictureBox1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>16</value>
|
||||
</data>
|
||||
<data name=">>pictureBox1.Name" xml:space="preserve">
|
||||
<value>pictureBox1</value>
|
||||
</data>
|
||||
<data name=">>pictureBox1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>pictureBox1.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanel2</value>
|
||||
</data>
|
||||
<data name=">>pictureBox1.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel2.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel2.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>3, 141</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel2.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>3, 10, 3, 3</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel2.RowCount" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>383, 30</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel2.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>16</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanel2.Name" xml:space="preserve">
|
||||
<value>tableLayoutPanel2</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanel2.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanel2.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanel2.ZOrder" xml:space="preserve">
|
||||
<value>10</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel2.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
|
||||
<value><?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="noteLabel" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="pictureBox1" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="AutoSize,0,Percent,100" /><Rows Styles="Percent,100" /></TableLayoutSettings></value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel3.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel3.AutoSizeMode" type="System.Windows.Forms.AutoSizeMode, System.Windows.Forms">
|
||||
<value>GrowAndShrink</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel3.ColumnCount" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="label1.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Left, Right</value>
|
||||
</data>
|
||||
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label1.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>25, 0</value>
|
||||
</data>
|
||||
<data name="label1.MaximumSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>355, 9999</value>
|
||||
</data>
|
||||
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>355, 30</value>
|
||||
</data>
|
||||
<data name="label1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="label1.Text" xml:space="preserve">
|
||||
<value>To reduce the risk of unauthorized access to your system, it is recommended that you also rotate the pool secret.</value>
|
||||
</data>
|
||||
<data name=">>label1.Name" xml:space="preserve">
|
||||
<value>label1</value>
|
||||
</data>
|
||||
<data name=">>label1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label1.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanel3</value>
|
||||
</data>
|
||||
<data name=">>label1.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="pictureBox2.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="pictureBox2.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>3, 3</value>
|
||||
</data>
|
||||
<data name="pictureBox2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>16, 16</value>
|
||||
</data>
|
||||
<data name="pictureBox2.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name=">>pictureBox2.Name" xml:space="preserve">
|
||||
<value>pictureBox2</value>
|
||||
</data>
|
||||
<data name=">>pictureBox2.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>pictureBox2.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanel3</value>
|
||||
</data>
|
||||
<data name=">>pictureBox2.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel3.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel3.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel3.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>3, 184</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel3.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>3, 10, 3, 3</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel3.RowCount" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel3.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>383, 30</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel3.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>17</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel3.Visible" type="System.Boolean, mscorlib">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanel3.Name" xml:space="preserve">
|
||||
<value>tableLayoutPanel3</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanel3.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanel3.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanel3.ZOrder" xml:space="preserve">
|
||||
<value>11</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel3.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
|
||||
<value><?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="label1" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="pictureBox2" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="AutoSize,0,Percent,100" /><Rows Styles="Percent,100" /></TableLayoutSettings></value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
@ -518,7 +664,7 @@
|
||||
<value>8</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>389, 221</value>
|
||||
<value>389, 252</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>12</value>
|
||||
@ -536,13 +682,13 @@
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
|
||||
<value><?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="ServerNameLabel" Row="0" RowSpan="1" Column="0" ColumnSpan="3" /><Control Name="OldPasswordLabel" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="oldPassBox" Row="2" RowSpan="1" Column="1" ColumnSpan="2" /><Control Name="NewPasswordLabel" Row="4" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="newPassBox" Row="4" RowSpan="1" Column="1" ColumnSpan="2" /><Control Name="RetypeNewPasswordLabel" Row="5" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="confirmBox" Row="5" RowSpan="1" Column="1" ColumnSpan="2" /><Control Name="okButton" Row="7" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="cancelButton" Row="7" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="currentPasswordError" Row="3" RowSpan="1" Column="1" ColumnSpan="2" /><Control Name="newPasswordError" Row="6" RowSpan="1" Column="1" ColumnSpan="2" /><Control Name="noteLabel" Row="1" RowSpan="1" Column="0" ColumnSpan="3" /></Controls><Columns Styles="AutoSize,0,Percent,100,AutoSize,0" /><Rows Styles="AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,22,AutoSize,0,AutoSize,0,AutoSize,22,AutoSize,0,Absolute,20" /></TableLayoutSettings></value>
|
||||
<value><?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="OldPasswordLabel" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="oldPassBox" Row="0" RowSpan="1" Column="1" ColumnSpan="2" /><Control Name="NewPasswordLabel" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="newPassBox" Row="2" RowSpan="1" Column="1" ColumnSpan="2" /><Control Name="RetypeNewPasswordLabel" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="confirmBox" Row="3" RowSpan="1" Column="1" ColumnSpan="2" /><Control Name="okButton" Row="7" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="cancelButton" Row="7" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="currentPasswordError" Row="1" RowSpan="1" Column="1" ColumnSpan="2" /><Control Name="newPasswordError" Row="4" RowSpan="1" Column="1" ColumnSpan="2" /><Control Name="tableLayoutPanel2" Row="5" RowSpan="1" Column="0" ColumnSpan="3" /><Control Name="tableLayoutPanel3" Row="6" RowSpan="1" Column="0" ColumnSpan="3" /></Controls><Columns Styles="AutoSize,0,Percent,100,AutoSize,0" /><Rows Styles="AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0" /></TableLayoutSettings></value>
|
||||
</data>
|
||||
<data name="oldPassBox.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="oldPassBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>142, 68</value>
|
||||
<value>142, 3</value>
|
||||
</data>
|
||||
<data name="oldPassBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>244, 23</value>
|
||||
@ -560,7 +706,7 @@
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>oldPassBox.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
<value>1</value>
|
||||
</data>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
@ -575,7 +721,7 @@
|
||||
<value>GrowAndShrink</value>
|
||||
</data>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>409, 241</value>
|
||||
<value>409, 272</value>
|
||||
</data>
|
||||
<data name="$this.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
|
@ -30,28 +30,24 @@ namespace XenAdmin.Dialogs.OptionsPages
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SecurityOptionsPage));
|
||||
this.SecurityTableLayoutPanel = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.SSLTableLayoutPanel = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.CertificateChangedCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.CertificateFoundCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.SSLLabel = new System.Windows.Forms.Label();
|
||||
this.labelReminder = new System.Windows.Forms.Label();
|
||||
this.checkBoxReminder = new System.Windows.Forms.CheckBox();
|
||||
this.SecurityTableLayoutPanel.SuspendLayout();
|
||||
this.SSLTableLayoutPanel.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// SecurityTableLayoutPanel
|
||||
//
|
||||
resources.ApplyResources(this.SecurityTableLayoutPanel, "SecurityTableLayoutPanel");
|
||||
this.SecurityTableLayoutPanel.Controls.Add(this.SSLTableLayoutPanel, 0, 1);
|
||||
this.SecurityTableLayoutPanel.Controls.Add(this.SSLLabel, 0, 0);
|
||||
this.SecurityTableLayoutPanel.Controls.Add(this.CertificateFoundCheckBox, 0, 1);
|
||||
this.SecurityTableLayoutPanel.Controls.Add(this.CertificateChangedCheckBox, 0, 2);
|
||||
this.SecurityTableLayoutPanel.Controls.Add(this.labelReminder, 0, 3);
|
||||
this.SecurityTableLayoutPanel.Controls.Add(this.checkBoxReminder, 0, 4);
|
||||
this.SecurityTableLayoutPanel.Name = "SecurityTableLayoutPanel";
|
||||
//
|
||||
// SSLTableLayoutPanel
|
||||
//
|
||||
resources.ApplyResources(this.SSLTableLayoutPanel, "SSLTableLayoutPanel");
|
||||
this.SSLTableLayoutPanel.Controls.Add(this.CertificateChangedCheckBox, 0, 1);
|
||||
this.SSLTableLayoutPanel.Controls.Add(this.CertificateFoundCheckBox, 0, 0);
|
||||
this.SSLTableLayoutPanel.Name = "SSLTableLayoutPanel";
|
||||
//
|
||||
// CertificateChangedCheckBox
|
||||
//
|
||||
resources.ApplyResources(this.CertificateChangedCheckBox, "CertificateChangedCheckBox");
|
||||
@ -69,6 +65,17 @@ namespace XenAdmin.Dialogs.OptionsPages
|
||||
resources.ApplyResources(this.SSLLabel, "SSLLabel");
|
||||
this.SSLLabel.Name = "SSLLabel";
|
||||
//
|
||||
// labelReminder
|
||||
//
|
||||
resources.ApplyResources(this.labelReminder, "labelReminder");
|
||||
this.labelReminder.Name = "labelReminder";
|
||||
//
|
||||
// checkBoxReminder
|
||||
//
|
||||
resources.ApplyResources(this.checkBoxReminder, "checkBoxReminder");
|
||||
this.checkBoxReminder.Name = "checkBoxReminder";
|
||||
this.checkBoxReminder.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// SecurityOptionsPage
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
@ -77,8 +84,6 @@ namespace XenAdmin.Dialogs.OptionsPages
|
||||
this.Name = "SecurityOptionsPage";
|
||||
this.SecurityTableLayoutPanel.ResumeLayout(false);
|
||||
this.SecurityTableLayoutPanel.PerformLayout();
|
||||
this.SSLTableLayoutPanel.ResumeLayout(false);
|
||||
this.SSLTableLayoutPanel.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
@ -88,8 +93,9 @@ namespace XenAdmin.Dialogs.OptionsPages
|
||||
|
||||
private System.Windows.Forms.TableLayoutPanel SecurityTableLayoutPanel;
|
||||
private System.Windows.Forms.Label SSLLabel;
|
||||
private System.Windows.Forms.TableLayoutPanel SSLTableLayoutPanel;
|
||||
private System.Windows.Forms.CheckBox CertificateChangedCheckBox;
|
||||
private System.Windows.Forms.CheckBox CertificateFoundCheckBox;
|
||||
private System.Windows.Forms.Label labelReminder;
|
||||
private System.Windows.Forms.CheckBox checkBoxReminder;
|
||||
}
|
||||
}
|
||||
|
@ -54,6 +54,8 @@ namespace XenAdmin.Dialogs.OptionsPages
|
||||
Registry.SSLCertificateTypes != SSLCertificateTypes.None;
|
||||
CertificateFoundCheckBox.Enabled = Registry.SSLCertificateTypes != SSLCertificateTypes.All;
|
||||
CertificateChangedCheckBox.Enabled = Registry.SSLCertificateTypes == SSLCertificateTypes.None;
|
||||
|
||||
checkBoxReminder.Checked = Properties.Settings.Default.RemindChangePassword;
|
||||
}
|
||||
|
||||
#region IOptionsPage Members
|
||||
@ -65,6 +67,9 @@ namespace XenAdmin.Dialogs.OptionsPages
|
||||
Properties.Settings.Default.WarnUnrecognizedCertificate = CertificateFoundCheckBox.Checked;
|
||||
if (CertificateChangedCheckBox.Enabled && CertificateChangedCheckBox.Checked != Properties.Settings.Default.WarnChangedCertificate)
|
||||
Properties.Settings.Default.WarnChangedCertificate = CertificateChangedCheckBox.Checked;
|
||||
|
||||
if (Properties.Settings.Default.RemindChangePassword != checkBoxReminder.Checked)
|
||||
Properties.Settings.Default.RemindChangePassword = checkBoxReminder.Checked;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
@ -128,115 +128,10 @@
|
||||
<data name="SecurityTableLayoutPanel.ColumnCount" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="SSLTableLayoutPanel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="SSLTableLayoutPanel.AutoSizeMode" type="System.Windows.Forms.AutoSizeMode, System.Windows.Forms">
|
||||
<value>GrowAndShrink</value>
|
||||
</data>
|
||||
<data name="SSLTableLayoutPanel.ColumnCount" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="CertificateChangedCheckBox.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="CertificateChangedCheckBox.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Tahoma, 8pt</value>
|
||||
</data>
|
||||
<data name="CertificateChangedCheckBox.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="CertificateChangedCheckBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>3, 26</value>
|
||||
</data>
|
||||
<data name="CertificateChangedCheckBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>201, 17</value>
|
||||
</data>
|
||||
<data name="CertificateChangedCheckBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="CertificateChangedCheckBox.Text" xml:space="preserve">
|
||||
<value>Warn me when a certificate ch&anges</value>
|
||||
</data>
|
||||
<data name=">>CertificateChangedCheckBox.Name" xml:space="preserve">
|
||||
<value>CertificateChangedCheckBox</value>
|
||||
</data>
|
||||
<data name=">>CertificateChangedCheckBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>CertificateChangedCheckBox.Parent" xml:space="preserve">
|
||||
<value>SSLTableLayoutPanel</value>
|
||||
</data>
|
||||
<data name=">>CertificateChangedCheckBox.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="CertificateFoundCheckBox.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="CertificateFoundCheckBox.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Tahoma, 8pt</value>
|
||||
</data>
|
||||
<data name="CertificateFoundCheckBox.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="CertificateFoundCheckBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>3, 3</value>
|
||||
</data>
|
||||
<data name="CertificateFoundCheckBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>222, 17</value>
|
||||
</data>
|
||||
<data name="CertificateFoundCheckBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="CertificateFoundCheckBox.Text" xml:space="preserve">
|
||||
<value>Warn me when a &new certificate is found</value>
|
||||
</data>
|
||||
<data name=">>CertificateFoundCheckBox.Name" xml:space="preserve">
|
||||
<value>CertificateFoundCheckBox</value>
|
||||
</data>
|
||||
<data name=">>CertificateFoundCheckBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>CertificateFoundCheckBox.Parent" xml:space="preserve">
|
||||
<value>SSLTableLayoutPanel</value>
|
||||
</data>
|
||||
<data name=">>CertificateFoundCheckBox.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="SSLTableLayoutPanel.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Tahoma, 8pt</value>
|
||||
</data>
|
||||
<data name="SSLTableLayoutPanel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>3, 41</value>
|
||||
</data>
|
||||
<data name="SSLTableLayoutPanel.RowCount" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="SSLTableLayoutPanel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>228, 46</value>
|
||||
</data>
|
||||
<data name="SSLTableLayoutPanel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name=">>SSLTableLayoutPanel.Name" xml:space="preserve">
|
||||
<value>SSLTableLayoutPanel</value>
|
||||
</data>
|
||||
<data name=">>SSLTableLayoutPanel.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>SSLTableLayoutPanel.Parent" xml:space="preserve">
|
||||
<value>SecurityTableLayoutPanel</value>
|
||||
</data>
|
||||
<data name=">>SSLTableLayoutPanel.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="SSLTableLayoutPanel.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
|
||||
<value><?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="CertificateChangedCheckBox" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="CertificateFoundCheckBox" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="Percent,100" /><Rows Styles="AutoSize,0,AutoSize,0,Absolute,20" /></TableLayoutSettings></value>
|
||||
</data>
|
||||
<data name="SSLLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="SSLLabel.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Tahoma, 8pt</value>
|
||||
</data>
|
||||
@ -268,8 +163,131 @@
|
||||
<value>SecurityTableLayoutPanel</value>
|
||||
</data>
|
||||
<data name=">>SSLLabel.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="CertificateFoundCheckBox.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="CertificateFoundCheckBox.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Tahoma, 8pt</value>
|
||||
</data>
|
||||
<data name="CertificateFoundCheckBox.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="CertificateFoundCheckBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>3, 41</value>
|
||||
</data>
|
||||
<data name="CertificateFoundCheckBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>222, 17</value>
|
||||
</data>
|
||||
<data name="CertificateFoundCheckBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="CertificateFoundCheckBox.Text" xml:space="preserve">
|
||||
<value>Warn me when a &new certificate is found</value>
|
||||
</data>
|
||||
<data name=">>CertificateFoundCheckBox.Name" xml:space="preserve">
|
||||
<value>CertificateFoundCheckBox</value>
|
||||
</data>
|
||||
<data name=">>CertificateFoundCheckBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>CertificateFoundCheckBox.Parent" xml:space="preserve">
|
||||
<value>SecurityTableLayoutPanel</value>
|
||||
</data>
|
||||
<data name=">>CertificateFoundCheckBox.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="CertificateChangedCheckBox.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="CertificateChangedCheckBox.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Tahoma, 8pt</value>
|
||||
</data>
|
||||
<data name="CertificateChangedCheckBox.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="CertificateChangedCheckBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>3, 64</value>
|
||||
</data>
|
||||
<data name="CertificateChangedCheckBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>201, 17</value>
|
||||
</data>
|
||||
<data name="CertificateChangedCheckBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="CertificateChangedCheckBox.Text" xml:space="preserve">
|
||||
<value>Warn me when a certificate ch&anges</value>
|
||||
</data>
|
||||
<data name=">>CertificateChangedCheckBox.Name" xml:space="preserve">
|
||||
<value>CertificateChangedCheckBox</value>
|
||||
</data>
|
||||
<data name=">>CertificateChangedCheckBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>CertificateChangedCheckBox.Parent" xml:space="preserve">
|
||||
<value>SecurityTableLayoutPanel</value>
|
||||
</data>
|
||||
<data name=">>CertificateChangedCheckBox.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="labelReminder.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="labelReminder.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>3, 104</value>
|
||||
</data>
|
||||
<data name="labelReminder.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>3, 20, 3, 12</value>
|
||||
</data>
|
||||
<data name="labelReminder.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>500, 26</value>
|
||||
</data>
|
||||
<data name="labelReminder.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="labelReminder.Text" xml:space="preserve">
|
||||
<value>You can configure [XenCenter] to display a reminder for changing the server root password whenever you rotate the pool secret.</value>
|
||||
</data>
|
||||
<data name=">>labelReminder.Name" xml:space="preserve">
|
||||
<value>labelReminder</value>
|
||||
</data>
|
||||
<data name=">>labelReminder.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>labelReminder.Parent" xml:space="preserve">
|
||||
<value>SecurityTableLayoutPanel</value>
|
||||
</data>
|
||||
<data name=">>labelReminder.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="checkBoxReminder.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="checkBoxReminder.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>3, 145</value>
|
||||
</data>
|
||||
<data name="checkBoxReminder.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>398, 17</value>
|
||||
</data>
|
||||
<data name="checkBoxReminder.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="checkBoxReminder.Text" xml:space="preserve">
|
||||
<value>&Remind me to change the server root password when I rotate the pool secret</value>
|
||||
</data>
|
||||
<data name=">>checkBoxReminder.Name" xml:space="preserve">
|
||||
<value>checkBoxReminder</value>
|
||||
</data>
|
||||
<data name=">>checkBoxReminder.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>checkBoxReminder.Parent" xml:space="preserve">
|
||||
<value>SecurityTableLayoutPanel</value>
|
||||
</data>
|
||||
<data name=">>checkBoxReminder.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="SecurityTableLayoutPanel.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
@ -280,13 +298,13 @@
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name="SecurityTableLayoutPanel.RowCount" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="SecurityTableLayoutPanel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>511, 251</value>
|
||||
</data>
|
||||
<data name="SecurityTableLayoutPanel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name=">>SecurityTableLayoutPanel.Name" xml:space="preserve">
|
||||
<value>SecurityTableLayoutPanel</value>
|
||||
@ -301,7 +319,7 @@
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="SecurityTableLayoutPanel.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
|
||||
<value><?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="SSLTableLayoutPanel" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="SSLLabel" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="Percent,100" /><Rows Styles="AutoSize,0,AutoSize,0" /></TableLayoutSettings></value>
|
||||
<value><?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="SSLLabel" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="CertificateFoundCheckBox" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="CertificateChangedCheckBox" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="labelReminder" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="checkBoxReminder" Row="4" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="Percent,100" /><Rows Styles="AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,Percent,100" /></TableLayoutSettings></value>
|
||||
</data>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
|
71
XenAdmin/Dialogs/RoleSelectionDialog.Designer.cs
generated
71
XenAdmin/Dialogs/RoleSelectionDialog.Designer.cs
generated
@ -36,26 +36,29 @@ namespace XenAdmin.Dialogs
|
||||
this.buttonCancel = new System.Windows.Forms.Button();
|
||||
this.labelBlurb = new System.Windows.Forms.Label();
|
||||
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.pictureBoxSubjectType = new System.Windows.Forms.PictureBox();
|
||||
this.labelDescription = new System.Windows.Forms.Label();
|
||||
this.gridRoles = new System.Windows.Forms.DataGridView();
|
||||
this.ColumnRolesCheckBox = new System.Windows.Forms.DataGridViewCheckBoxColumn();
|
||||
this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.pictureBoxSubjectType = new System.Windows.Forms.PictureBox();
|
||||
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.tableLayoutPanel1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.gridRoles)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBoxSubjectType)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.gridRoles)).BeginInit();
|
||||
this.tableLayoutPanel2.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// buttonSave
|
||||
//
|
||||
resources.ApplyResources(this.buttonSave, "buttonSave");
|
||||
this.buttonSave.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.buttonSave.Name = "buttonSave";
|
||||
this.buttonSave.UseVisualStyleBackColor = true;
|
||||
this.buttonSave.Click += new System.EventHandler(this.buttonSave_Click);
|
||||
//
|
||||
// buttonCancel
|
||||
//
|
||||
@ -63,23 +66,35 @@ namespace XenAdmin.Dialogs
|
||||
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.buttonCancel.Name = "buttonCancel";
|
||||
this.buttonCancel.UseVisualStyleBackColor = true;
|
||||
this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
|
||||
//
|
||||
// labelBlurb
|
||||
//
|
||||
resources.ApplyResources(this.labelBlurb, "labelBlurb");
|
||||
this.tableLayoutPanel1.SetColumnSpan(this.labelBlurb, 3);
|
||||
this.labelBlurb.Name = "labelBlurb";
|
||||
//
|
||||
// tableLayoutPanel1
|
||||
//
|
||||
resources.ApplyResources(this.tableLayoutPanel1, "tableLayoutPanel1");
|
||||
this.tableLayoutPanel1.Controls.Add(this.labelDescription, 1, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.gridRoles, 0, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.pictureBoxSubjectType, 0, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.labelBlurb, 1, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.labelDescription, 2, 1);
|
||||
this.tableLayoutPanel1.Controls.Add(this.gridRoles, 0, 1);
|
||||
this.tableLayoutPanel1.Controls.Add(this.buttonCancel, 3, 3);
|
||||
this.tableLayoutPanel1.Controls.Add(this.buttonSave, 2, 3);
|
||||
this.tableLayoutPanel1.Controls.Add(this.tableLayoutPanel2, 0, 2);
|
||||
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||
//
|
||||
// pictureBoxSubjectType
|
||||
//
|
||||
resources.ApplyResources(this.pictureBoxSubjectType, "pictureBoxSubjectType");
|
||||
this.pictureBoxSubjectType.Name = "pictureBoxSubjectType";
|
||||
this.pictureBoxSubjectType.TabStop = false;
|
||||
//
|
||||
// labelDescription
|
||||
//
|
||||
resources.ApplyResources(this.labelDescription, "labelDescription");
|
||||
this.tableLayoutPanel1.SetColumnSpan(this.labelDescription, 2);
|
||||
this.labelDescription.Name = "labelDescription";
|
||||
//
|
||||
// gridRoles
|
||||
@ -89,12 +104,14 @@ namespace XenAdmin.Dialogs
|
||||
this.gridRoles.AllowUserToResizeColumns = false;
|
||||
this.gridRoles.AllowUserToResizeRows = false;
|
||||
this.gridRoles.BackgroundColor = System.Drawing.SystemColors.Window;
|
||||
this.gridRoles.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.gridRoles.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
|
||||
this.gridRoles.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.gridRoles.ColumnHeadersVisible = false;
|
||||
this.gridRoles.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||
this.ColumnRolesCheckBox,
|
||||
this.dataGridViewTextBoxColumn1});
|
||||
this.tableLayoutPanel1.SetColumnSpan(this.gridRoles, 2);
|
||||
resources.ApplyResources(this.gridRoles, "gridRoles");
|
||||
this.gridRoles.MultiSelect = false;
|
||||
this.gridRoles.Name = "gridRoles";
|
||||
@ -132,11 +149,25 @@ namespace XenAdmin.Dialogs
|
||||
this.dataGridViewTextBoxColumn1.Resizable = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.dataGridViewTextBoxColumn1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
|
||||
//
|
||||
// pictureBoxSubjectType
|
||||
// tableLayoutPanel2
|
||||
//
|
||||
resources.ApplyResources(this.pictureBoxSubjectType, "pictureBoxSubjectType");
|
||||
this.pictureBoxSubjectType.Name = "pictureBoxSubjectType";
|
||||
this.pictureBoxSubjectType.TabStop = false;
|
||||
resources.ApplyResources(this.tableLayoutPanel2, "tableLayoutPanel2");
|
||||
this.tableLayoutPanel1.SetColumnSpan(this.tableLayoutPanel2, 4);
|
||||
this.tableLayoutPanel2.Controls.Add(this.pictureBox1, 0, 0);
|
||||
this.tableLayoutPanel2.Controls.Add(this.label1, 1, 0);
|
||||
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
|
||||
//
|
||||
// pictureBox1
|
||||
//
|
||||
resources.ApplyResources(this.pictureBox1, "pictureBox1");
|
||||
this.pictureBox1.Image = global::XenAdmin.Properties.Resources._000_Info3_h32bit_16;
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.TabStop = false;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
resources.ApplyResources(this.label1, "label1");
|
||||
this.label1.Name = "label1";
|
||||
//
|
||||
// dataGridViewTextBoxColumn2
|
||||
//
|
||||
@ -156,32 +187,22 @@ namespace XenAdmin.Dialogs
|
||||
this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
|
||||
this.dataGridViewTextBoxColumn3.ReadOnly = true;
|
||||
//
|
||||
// tableLayoutPanel2
|
||||
//
|
||||
resources.ApplyResources(this.tableLayoutPanel2, "tableLayoutPanel2");
|
||||
this.tableLayoutPanel2.Controls.Add(this.labelBlurb, 1, 0);
|
||||
this.tableLayoutPanel2.Controls.Add(this.pictureBoxSubjectType, 0, 0);
|
||||
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
|
||||
//
|
||||
// RoleSelectionDialog
|
||||
//
|
||||
this.AcceptButton = this.buttonSave;
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
|
||||
this.CancelButton = this.buttonCancel;
|
||||
this.Controls.Add(this.tableLayoutPanel2);
|
||||
this.Controls.Add(this.tableLayoutPanel1);
|
||||
this.Controls.Add(this.buttonCancel);
|
||||
this.Controls.Add(this.buttonSave);
|
||||
this.Name = "RoleSelectionDialog";
|
||||
this.tableLayoutPanel1.ResumeLayout(false);
|
||||
this.tableLayoutPanel1.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.gridRoles)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBoxSubjectType)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.gridRoles)).EndInit();
|
||||
this.tableLayoutPanel2.ResumeLayout(false);
|
||||
this.tableLayoutPanel2.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
@ -199,5 +220,7 @@ namespace XenAdmin.Dialogs
|
||||
private System.Windows.Forms.DataGridViewCheckBoxColumn ColumnRolesCheckBox;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn1;
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
|
||||
private System.Windows.Forms.PictureBox pictureBox1;
|
||||
private System.Windows.Forms.Label label1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -35,6 +35,7 @@ using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using XenAPI;
|
||||
using XenAdmin.Actions;
|
||||
using XenAdmin.Core;
|
||||
using XenAdmin.Network;
|
||||
|
||||
|
||||
@ -42,35 +43,30 @@ namespace XenAdmin.Dialogs
|
||||
{
|
||||
public partial class RoleSelectionDialog : XenDialogBase
|
||||
{
|
||||
private Subject[] subjects;
|
||||
private List<Subject> subjects;
|
||||
|
||||
private Dictionary<Role, List<Subject>> roleAssignment;
|
||||
// Used to stop 'changes made' checks during a batch select
|
||||
private bool batchChange;
|
||||
private IXenConnection _connection;
|
||||
private Dictionary<Role, List<Subject>> _subjectsPerRole;
|
||||
|
||||
public RoleSelectionDialog()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public RoleSelectionDialog(IXenConnection connection, Subject[] subjects)
|
||||
public RoleSelectionDialog(IXenConnection connection, List<Subject> subjects)
|
||||
: base(connection)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
_connection = connection;
|
||||
|
||||
this.subjects = subjects;
|
||||
roleAssignment = new Dictionary<Role,List<Subject>>();
|
||||
|
||||
var allAreGroups = subjects.Length > 0 && subjects.All(s => s.IsGroup);
|
||||
var allAreUsers = subjects.Length > 0 && subjects.All(s => !s.IsGroup);
|
||||
var allAreGroups = subjects.Count > 0 && subjects.All(s => s.IsGroup);
|
||||
var allAreUsers = subjects.Count > 0 && subjects.All(s => !s.IsGroup);
|
||||
|
||||
pictureBoxSubjectType.Image = allAreUsers
|
||||
? Images.StaticImages._000_User_h32bit_32
|
||||
: Images.StaticImages._000_UserAndGroup_h32bit_32;
|
||||
|
||||
if (subjects.Length == 1)
|
||||
if (subjects.Count == 1)
|
||||
{
|
||||
Subject subject = subjects[0];
|
||||
string sName = (subject.DisplayName ?? subject.SubjectName ?? Messages.UNKNOWN_AD_USER).Ellipsise(30);
|
||||
@ -87,163 +83,122 @@ namespace XenAdmin.Dialogs
|
||||
}
|
||||
|
||||
// Get the list of roles off the server and arrange them into rank
|
||||
List<Role> serverRoles = new List<Role>(_connection.Cache.Roles);
|
||||
//hide basic permissions, we only want the roles.
|
||||
serverRoles.RemoveAll(delegate(Role r){return r.subroles.Count < 1;});
|
||||
serverRoles.Sort();
|
||||
serverRoles.Reverse();
|
||||
foreach (Role r in serverRoles)
|
||||
{
|
||||
roleAssignment.Add(r, new List<Subject>());
|
||||
}
|
||||
foreach (Subject s in subjects)
|
||||
{
|
||||
List<Role> subjectRoles = _connection.ResolveAll(s.roles);
|
||||
foreach (Role r in subjectRoles)
|
||||
{
|
||||
roleAssignment[r].Add(s);
|
||||
}
|
||||
}
|
||||
var serverRoles = connection.Cache.Roles.Where(r => r.subroles.Count > 0).OrderBy(r => r).Reverse().ToList();
|
||||
_subjectsPerRole = new Dictionary<Role, List<Subject>>();
|
||||
|
||||
foreach (Role role in serverRoles)
|
||||
{
|
||||
DataGridViewRow r = new DataGridViewRow();
|
||||
DataGridViewCheckBoxCellEx c1 = new DataGridViewCheckBoxCellEx();
|
||||
c1.ThreeState = true;
|
||||
if (roleAssignment[role].Count == subjects.Length)
|
||||
{
|
||||
c1.Value = CheckState.Checked;
|
||||
c1.CheckState = CheckState.Checked;
|
||||
}
|
||||
else if (roleAssignment[role].Count == 0)
|
||||
{
|
||||
c1.Value = CheckState.Unchecked;
|
||||
c1.CheckState = CheckState.Unchecked;
|
||||
}
|
||||
else
|
||||
{
|
||||
c1.Value = CheckState.Indeterminate;
|
||||
c1.CheckState = CheckState.Indeterminate;
|
||||
}
|
||||
DataGridViewTextBoxCell c2 = new DataGridViewTextBoxCell();
|
||||
c2.Value = role.FriendlyName();
|
||||
r.Cells.Add(c1);
|
||||
r.Cells.Add(c2);
|
||||
r.Tag = role;
|
||||
gridRoles.Rows.Add(r);
|
||||
var subjectsWithRole = subjects.Where(s => s.roles.Contains(new XenRef<Role>(role.opaque_ref))).ToList();
|
||||
_subjectsPerRole[role] = subjectsWithRole;
|
||||
|
||||
var row = new RoleDataGridViewRow(role);
|
||||
|
||||
if (subjectsWithRole.Count == subjects.Count)
|
||||
row.IsChecked = true;
|
||||
else if (subjectsWithRole.Count == 0)
|
||||
row.IsChecked = false;
|
||||
|
||||
gridRoles.Rows.Add(row);
|
||||
}
|
||||
setRoleDescription();
|
||||
|
||||
UpdateRoleDescription();
|
||||
tableLayoutPanel2.Visible = false;
|
||||
buttonSave.Enabled = false;
|
||||
}
|
||||
|
||||
private void setRoleDescription()
|
||||
public List<Role> SelectedRoles =>
|
||||
gridRoles.Rows.Cast<RoleDataGridViewRow>().Where(r => r.IsChecked).Select(r => r.Role).ToList();
|
||||
|
||||
private void UpdateRoleDescription()
|
||||
{
|
||||
if (gridRoles.SelectedRows.Count < 1)
|
||||
return;
|
||||
Role r = gridRoles.SelectedRows[0].Tag as Role;
|
||||
if (r == null)
|
||||
return;
|
||||
|
||||
labelDescription.Text = r.FriendlyDescription();
|
||||
if (gridRoles.SelectedRows.Count == 1 && gridRoles.SelectedRows[0] is RoleDataGridViewRow row)
|
||||
labelDescription.Text = row.Role.FriendlyDescription();
|
||||
}
|
||||
|
||||
private void buttonSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
foreach (Subject s in subjects)
|
||||
{
|
||||
List<Role> rolesToAdd = new List<Role>();
|
||||
List<Role> rolesToRemove = new List<Role>();
|
||||
foreach (DataGridViewRow r in gridRoles.Rows)
|
||||
{
|
||||
bool check = (bool)r.Cells[0].Value;
|
||||
Role role = r.Tag as Role;
|
||||
if (check && !(roleAssignment[role].Contains(s)))
|
||||
rolesToAdd.Add(role);
|
||||
else if (!check && (roleAssignment[role].Contains(s)))
|
||||
rolesToRemove.Add(role);
|
||||
}
|
||||
|
||||
new AddRemoveRolesAction(_connection, s, rolesToAdd, rolesToRemove).RunAsync();
|
||||
}
|
||||
Close();
|
||||
}
|
||||
|
||||
private bool changesMade()
|
||||
private void UpdateButtonsAndInfo()
|
||||
{
|
||||
foreach (DataGridViewRow r in gridRoles.Rows)
|
||||
{
|
||||
Role role = r.Tag as Role;
|
||||
DataGridViewCheckBoxCellEx c = r.Cells[0] as DataGridViewCheckBoxCellEx;
|
||||
if (c.CheckState == CheckState.Checked && roleAssignment[role].Count < subjects.Length)
|
||||
if (r is RoleDataGridViewRow row)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if (c.CheckState == CheckState.Unchecked && roleAssignment[role].Count > 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
// Don't care about intermediate values, it's not possible to set them in the dialog
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (row.IsChecked && _subjectsPerRole[row.Role].Count < subjects.Count)
|
||||
{
|
||||
buttonSave.Enabled = true;
|
||||
tableLayoutPanel2.Visible = false;
|
||||
return;
|
||||
}
|
||||
|
||||
private void buttonCancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
Close();
|
||||
if (!row.IsChecked && _subjectsPerRole[row.Role].Count > 0)
|
||||
{
|
||||
buttonSave.Enabled = true;
|
||||
tableLayoutPanel2.Visible = row.Role.name_label == Role.MR_ROLE_POOL_ADMIN &&
|
||||
connection != null && Helpers.StockholmOrGreater(connection) &&
|
||||
!connection.Cache.Hosts.Any(Host.RestrictPoolSecretRotation);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tableLayoutPanel2.Visible = false;
|
||||
buttonSave.Enabled = false;
|
||||
}
|
||||
|
||||
private void gridRoles_SelectionChanged(object sender, EventArgs e)
|
||||
{
|
||||
setRoleDescription();
|
||||
UpdateRoleDescription();
|
||||
}
|
||||
|
||||
|
||||
// We want to allow the user to select rows without changing the check boxes so they can browse the descriptions
|
||||
// so handle mouseclicks only on the check box column
|
||||
// Only allow them to select a single role, which also means all that tri state rubbish dissapears as soon as they make a selection
|
||||
private void gridRoles_CellContentClick(object sender, DataGridViewCellEventArgs e)
|
||||
{
|
||||
if (e.ColumnIndex != 0 || e.RowIndex < 0 || batchChange)
|
||||
//handle mouse clicks only on the check box column because the user should be able
|
||||
//to select rows by clicking but without checking them so as to browse the descriptions
|
||||
|
||||
if (e.ColumnIndex != 0 || e.RowIndex < 0 || e.RowIndex >= gridRoles.RowCount)
|
||||
return;
|
||||
|
||||
selectIndex(e.RowIndex);
|
||||
buttonSave.Enabled = changesMade();
|
||||
CheckRowByIndex(e.RowIndex);
|
||||
}
|
||||
|
||||
// We want to allow the user to select rows without changing the check boxes so they can browse the descriptions
|
||||
// but we want it to be keyboard accessible. Capture the select keypress and toggle the checkbox
|
||||
private void gridRoles_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
// makes assumption about multiselect
|
||||
System.Diagnostics.Trace.Assert(!gridRoles.MultiSelect);
|
||||
|
||||
if (batchChange || e.KeyChar != ' ')
|
||||
if (e.KeyChar != (char)Keys.Space || gridRoles.SelectedRows.Count != 1)
|
||||
return;
|
||||
|
||||
selectIndex(gridRoles.SelectedRows[0].Index);
|
||||
buttonSave.Enabled = changesMade();
|
||||
CheckRowByIndex(gridRoles.SelectedRows[0].Index);
|
||||
}
|
||||
|
||||
private void selectIndex(int i)
|
||||
private void CheckRowByIndex(int index)
|
||||
{
|
||||
batchChange = true;
|
||||
foreach (DataGridViewRow r in gridRoles.Rows)
|
||||
{
|
||||
if (i == r.Index)
|
||||
{
|
||||
r.Cells[0].Value = true;
|
||||
((DataGridViewCheckBoxCellEx)(r.Cells[0])).CheckState = CheckState.Checked;
|
||||
continue;
|
||||
}
|
||||
r.Cells[0].Value = false;
|
||||
((DataGridViewCheckBoxCellEx)(r.Cells[0])).CheckState = CheckState.Unchecked;
|
||||
if (r is RoleDataGridViewRow row)
|
||||
row.IsChecked = index == r.Index;
|
||||
}
|
||||
batchChange = false;
|
||||
|
||||
UpdateButtonsAndInfo();
|
||||
}
|
||||
|
||||
// Data grid view check box cells dont commit their value immeadiately, though the UI updates (edit mode).
|
||||
// To prevent messing around we handle the check state value ourselves.
|
||||
class DataGridViewCheckBoxCellEx : DataGridViewCheckBoxCell
|
||||
|
||||
private class RoleDataGridViewRow : DataGridViewRow
|
||||
{
|
||||
public CheckState CheckState = CheckState.Unchecked;
|
||||
private readonly DataGridViewCheckBoxCell _c1 = new DataGridViewCheckBoxCell {ThreeState = true};
|
||||
private readonly DataGridViewTextBoxCell _c2 = new DataGridViewTextBoxCell();
|
||||
|
||||
public RoleDataGridViewRow(Role role)
|
||||
{
|
||||
Role = role;
|
||||
_c1.Value = CheckState.Indeterminate;
|
||||
_c2.Value = role.FriendlyName();
|
||||
Cells.AddRange(_c1, _c2);
|
||||
}
|
||||
|
||||
public Role Role { get; }
|
||||
|
||||
public bool IsChecked
|
||||
{
|
||||
get => (CheckState)_c1.Value == CheckState.Checked;
|
||||
set => _c1.Value = value ? CheckState.Checked : CheckState.Unchecked;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -121,10 +121,6 @@
|
||||
<data name="buttonSave.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Bottom, Right</value>
|
||||
</data>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="buttonSave.Enabled" type="System.Boolean, mscorlib">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="buttonSave.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
@ -133,11 +129,12 @@
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="buttonSave.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>445, 275</value>
|
||||
<value>435, 267</value>
|
||||
</data>
|
||||
<data name="buttonSave.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>76, 26</value>
|
||||
</data>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="buttonSave.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
</data>
|
||||
@ -151,10 +148,10 @@
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>buttonSave.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>buttonSave.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="buttonCancel.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Bottom, Right</value>
|
||||
@ -169,10 +166,10 @@
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="buttonCancel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>527, 275</value>
|
||||
<value>518, 267</value>
|
||||
</data>
|
||||
<data name="buttonCancel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>76, 26</value>
|
||||
<value>75, 26</value>
|
||||
</data>
|
||||
<data name="buttonCancel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
@ -187,167 +184,17 @@
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>buttonCancel.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>buttonCancel.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="labelBlurb.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="labelBlurb.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
<data name="labelBlurb.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="labelBlurb.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="labelBlurb.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>41, 0</value>
|
||||
</data>
|
||||
<data name="labelBlurb.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>546, 45</value>
|
||||
</data>
|
||||
<data name="labelBlurb.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="labelBlurb.Text" xml:space="preserve">
|
||||
<value>Select the role you want to assign to .</value>
|
||||
</data>
|
||||
<data name=">>labelBlurb.Name" xml:space="preserve">
|
||||
<value>labelBlurb</value>
|
||||
</data>
|
||||
<data name=">>labelBlurb.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>labelBlurb.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanel2</value>
|
||||
</data>
|
||||
<data name=">>labelBlurb.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Bottom, Left, Right</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.ColumnCount" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="labelDescription.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="labelDescription.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="labelDescription.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="labelDescription.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>204, 3</value>
|
||||
</data>
|
||||
<data name="labelDescription.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>10, 3, 3, 3</value>
|
||||
</data>
|
||||
<data name="labelDescription.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>127, 15</value>
|
||||
</data>
|
||||
<data name="labelDescription.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="labelDescription.Text" xml:space="preserve">
|
||||
<value>Description of the role.</value>
|
||||
</data>
|
||||
<data name=">>labelDescription.Name" xml:space="preserve">
|
||||
<value>labelDescription</value>
|
||||
</data>
|
||||
<data name=">>labelDescription.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>labelDescription.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>labelDescription.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<metadata name="ColumnRolesCheckBox.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="ColumnRolesCheckBox.HeaderText" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="ColumnRolesCheckBox.MinimumWidth" type="System.Int32, mscorlib">
|
||||
<value>30</value>
|
||||
</data>
|
||||
<data name="ColumnRolesCheckBox.Width" type="System.Int32, mscorlib">
|
||||
<value>30</value>
|
||||
</data>
|
||||
<metadata name="dataGridViewTextBoxColumn1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="dataGridViewTextBoxColumn1.HeaderText" xml:space="preserve">
|
||||
<value>Roles</value>
|
||||
</data>
|
||||
<data name="gridRoles.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
<data name="gridRoles.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="gridRoles.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>3, 3</value>
|
||||
</data>
|
||||
<data name="gridRoles.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>188, 183</value>
|
||||
</data>
|
||||
<data name="gridRoles.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name=">>gridRoles.Name" xml:space="preserve">
|
||||
<value>gridRoles</value>
|
||||
</data>
|
||||
<data name=">>gridRoles.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.DataGridView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>gridRoles.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>gridRoles.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>13, 71</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>3, 10, 3, 3</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.RowCount" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>590, 189</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanel1.Name" xml:space="preserve">
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanel1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanel1.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanel1.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
|
||||
<value><?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="labelDescription" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="gridRoles" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="Percent,33,Percent,67" /><Rows Styles="AutoSize,0" /></TableLayoutSettings></value>
|
||||
</data>
|
||||
<data name="pictureBoxSubjectType.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top</value>
|
||||
</data>
|
||||
@ -376,37 +223,178 @@
|
||||
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>pictureBoxSubjectType.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanel2</value>
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>pictureBoxSubjectType.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
<value>0</value>
|
||||
</data>
|
||||
<metadata name="dataGridViewTextBoxColumn2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<data name="labelDescription.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="labelDescription.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="labelDescription.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="labelDescription.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>191, 48</value>
|
||||
</data>
|
||||
<data name="labelDescription.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>10, 10, 3, 0</value>
|
||||
</data>
|
||||
<data name="labelDescription.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>127, 15</value>
|
||||
</data>
|
||||
<data name="labelDescription.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="labelDescription.Text" xml:space="preserve">
|
||||
<value>Description of the role.</value>
|
||||
</data>
|
||||
<data name=">>labelDescription.Name" xml:space="preserve">
|
||||
<value>labelDescription</value>
|
||||
</data>
|
||||
<data name=">>labelDescription.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>labelDescription.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>labelDescription.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<metadata name="ColumnRolesCheckBox.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="dataGridViewTextBoxColumn2.HeaderText" xml:space="preserve">
|
||||
<value>Permissions</value>
|
||||
<data name="ColumnRolesCheckBox.HeaderText" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="dataGridViewTextBoxColumn3.HeaderText" xml:space="preserve">
|
||||
<value>Subject</value>
|
||||
<data name="ColumnRolesCheckBox.MinimumWidth" type="System.Int32, mscorlib">
|
||||
<value>30</value>
|
||||
</data>
|
||||
<data name="ColumnRolesCheckBox.Width" type="System.Int32, mscorlib">
|
||||
<value>30</value>
|
||||
</data>
|
||||
<metadata name="dataGridViewTextBoxColumn1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="dataGridViewTextBoxColumn1.HeaderText" xml:space="preserve">
|
||||
<value>Roles</value>
|
||||
</data>
|
||||
<data name="gridRoles.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
<data name="gridRoles.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="gridRoles.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>3, 48</value>
|
||||
</data>
|
||||
<data name="gridRoles.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>3, 10, 3, 3</value>
|
||||
</data>
|
||||
<data name="gridRoles.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>175, 171</value>
|
||||
</data>
|
||||
<data name="gridRoles.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name=">>gridRoles.Name" xml:space="preserve">
|
||||
<value>gridRoles</value>
|
||||
</data>
|
||||
<data name=">>gridRoles.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.DataGridView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>gridRoles.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>gridRoles.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel2.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Left, Right</value>
|
||||
<value>Left, Right</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel2.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel2.AutoSizeMode" type="System.Windows.Forms.AutoSizeMode, System.Windows.Forms">
|
||||
<value>GrowAndShrink</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel2.ColumnCount" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="pictureBox1.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="pictureBox1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>3, 3</value>
|
||||
</data>
|
||||
<data name="pictureBox1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>16, 16</value>
|
||||
</data>
|
||||
<data name="pictureBox1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name=">>pictureBox1.Name" xml:space="preserve">
|
||||
<value>pictureBox1</value>
|
||||
</data>
|
||||
<data name=">>pictureBox1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>pictureBox1.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanel2</value>
|
||||
</data>
|
||||
<data name=">>pictureBox1.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="label1.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Left, Right</value>
|
||||
</data>
|
||||
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label1.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>25, 0</value>
|
||||
</data>
|
||||
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>562, 30</value>
|
||||
</data>
|
||||
<data name="label1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="label1.Text" xml:space="preserve">
|
||||
<value>To reduce the risk of unauthorized access to your system after you have removed the Pool Administrator role, it is recommended that you also change the server root password and rotate the pool secret.</value>
|
||||
</data>
|
||||
<data name=">>label1.Name" xml:space="preserve">
|
||||
<value>label1</value>
|
||||
</data>
|
||||
<data name=">>label1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>label1.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanel2</value>
|
||||
</data>
|
||||
<data name=">>label1.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel2.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel2.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>13, 13</value>
|
||||
<value>3, 228</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel2.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>3, 6, 3, 6</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel2.RowCount" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>590, 45</value>
|
||||
<value>590, 30</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel2.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>6</value>
|
||||
@ -418,13 +406,88 @@
|
||||
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanel2.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanel2.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel2.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
|
||||
<value><?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="labelBlurb" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="pictureBoxSubjectType" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="AutoSize,0,Percent,100" /><Rows Styles="Percent,50" /></TableLayoutSettings></value>
|
||||
<value><?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="pictureBox1" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="label1" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /></Controls><Columns Styles="AutoSize,0,Percent,100" /><Rows Styles="Percent,100" /></TableLayoutSettings></value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>10, 10</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>3, 10, 3, 3</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.RowCount" type="System.Int32, mscorlib">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>596, 296</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanel1.Name" xml:space="preserve">
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanel1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanel1.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanel1.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
|
||||
<value><?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="pictureBoxSubjectType" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="labelBlurb" Row="0" RowSpan="1" Column="1" ColumnSpan="3" /><Control Name="labelDescription" Row="1" RowSpan="1" Column="2" ColumnSpan="2" /><Control Name="gridRoles" Row="1" RowSpan="1" Column="0" ColumnSpan="2" /><Control Name="buttonCancel" Row="3" RowSpan="1" Column="3" ColumnSpan="1" /><Control Name="buttonSave" Row="3" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="tableLayoutPanel2" Row="2" RowSpan="1" Column="0" ColumnSpan="4" /></Controls><Columns Styles="AutoSize,0,Percent,30,Percent,70,AutoSize,0" /><Rows Styles="AutoSize,0,Percent,100,AutoSize,0,AutoSize,0" /></TableLayoutSettings></value>
|
||||
</data>
|
||||
<data name="labelBlurb.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="labelBlurb.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="labelBlurb.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>41, 0</value>
|
||||
</data>
|
||||
<data name="labelBlurb.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>203, 15</value>
|
||||
</data>
|
||||
<data name="labelBlurb.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="labelBlurb.Text" xml:space="preserve">
|
||||
<value>Select the role you want to assign to .</value>
|
||||
</data>
|
||||
<data name=">>labelBlurb.Name" xml:space="preserve">
|
||||
<value>labelBlurb</value>
|
||||
</data>
|
||||
<data name=">>labelBlurb.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>labelBlurb.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>labelBlurb.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<metadata name="dataGridViewTextBoxColumn2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="dataGridViewTextBoxColumn2.HeaderText" xml:space="preserve">
|
||||
<value>Permissions</value>
|
||||
</data>
|
||||
<data name="dataGridViewTextBoxColumn3.HeaderText" xml:space="preserve">
|
||||
<value>Subject</value>
|
||||
</data>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
@ -433,7 +496,7 @@
|
||||
<value>96, 96</value>
|
||||
</data>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>616, 314</value>
|
||||
<value>616, 316</value>
|
||||
</data>
|
||||
<data name="$this.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
|
37
XenAdmin/MainWindow.Designer.cs
generated
37
XenAdmin/MainWindow.Designer.cs
generated
@ -180,6 +180,7 @@ namespace XenAdmin
|
||||
this.backupToolStripMenuItem = new XenAdmin.Commands.CommandToolStripMenuItem();
|
||||
this.restoreFromBackupToolStripMenuItem = new XenAdmin.Commands.CommandToolStripMenuItem();
|
||||
this.toolStripSeparator23 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.toolStripMenuItemInstallCertificate = new XenAdmin.Commands.CommandToolStripMenuItem();
|
||||
this.maintenanceModeToolStripMenuItem1 = new XenAdmin.Commands.CommandToolStripMenuItem();
|
||||
this.controlDomainMemoryToolStripMenuItem = new XenAdmin.Commands.CommandToolStripMenuItem();
|
||||
this.RemoveCrashdumpsToolStripMenuItem = new XenAdmin.Commands.CommandToolStripMenuItem();
|
||||
@ -277,12 +278,12 @@ namespace XenAdmin
|
||||
this.securityGroupsToolStripMenuItem = new XenAdmin.Commands.CommandToolStripMenuItem();
|
||||
this.MenuPanel = new System.Windows.Forms.Panel();
|
||||
this.StatusStrip = new System.Windows.Forms.StatusStrip();
|
||||
this.statusLabel = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.statusProgressBar = new System.Windows.Forms.ToolStripProgressBar();
|
||||
this.toolStripMenuItemInstallCertificate = new XenAdmin.Commands.CommandToolStripMenuItem();
|
||||
this.statusLabel = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.statusLabelAlerts = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.statusLabelUpdates = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.statusLabelErrors = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.toolStripMenuItemRotateSecret = new XenAdmin.Commands.CommandToolStripMenuItem();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
@ -927,6 +928,7 @@ namespace XenAdmin
|
||||
this.conversionToolStripMenuItem,
|
||||
this.toolStripSeparator9,
|
||||
this.changePoolPasswordToolStripMenuItem,
|
||||
this.toolStripMenuItemRotateSecret,
|
||||
this.toolStripMenuItem1,
|
||||
this.deleteToolStripMenuItem,
|
||||
this.toolStripSeparator26,
|
||||
@ -1234,6 +1236,12 @@ namespace XenAdmin
|
||||
this.toolStripSeparator23.Name = "toolStripSeparator23";
|
||||
resources.ApplyResources(this.toolStripSeparator23, "toolStripSeparator23");
|
||||
//
|
||||
// toolStripMenuItemInstallCertificate
|
||||
//
|
||||
this.toolStripMenuItemInstallCertificate.Command = new XenAdmin.Commands.InstallCertificateCommand();
|
||||
this.toolStripMenuItemInstallCertificate.Name = "toolStripMenuItemInstallCertificate";
|
||||
resources.ApplyResources(this.toolStripMenuItemInstallCertificate, "toolStripMenuItemInstallCertificate");
|
||||
//
|
||||
// maintenanceModeToolStripMenuItem1
|
||||
//
|
||||
this.maintenanceModeToolStripMenuItem1.Command = new XenAdmin.Commands.HostMaintenanceModeCommand();
|
||||
@ -1890,14 +1898,6 @@ namespace XenAdmin
|
||||
this.StatusStrip.Name = "StatusStrip";
|
||||
this.StatusStrip.ShowItemToolTips = true;
|
||||
//
|
||||
// statusLabel
|
||||
//
|
||||
this.statusLabel.AutoToolTip = true;
|
||||
resources.ApplyResources(this.statusLabel, "statusLabel");
|
||||
this.statusLabel.Name = "statusLabel";
|
||||
this.statusLabel.Overflow = System.Windows.Forms.ToolStripItemOverflow.Never;
|
||||
this.statusLabel.Spring = true;
|
||||
//
|
||||
// statusProgressBar
|
||||
//
|
||||
resources.ApplyResources(this.statusProgressBar, "statusProgressBar");
|
||||
@ -1905,11 +1905,13 @@ namespace XenAdmin
|
||||
this.statusProgressBar.Name = "statusProgressBar";
|
||||
this.statusProgressBar.Overflow = System.Windows.Forms.ToolStripItemOverflow.Never;
|
||||
//
|
||||
// toolStripMenuItemInstallCertificate
|
||||
// statusLabel
|
||||
//
|
||||
this.toolStripMenuItemInstallCertificate.Command = new XenAdmin.Commands.InstallCertificateCommand();
|
||||
this.toolStripMenuItemInstallCertificate.Name = "toolStripMenuItemInstallCertificate";
|
||||
resources.ApplyResources(this.toolStripMenuItemInstallCertificate, "toolStripMenuItemInstallCertificate");
|
||||
this.statusLabel.AutoToolTip = true;
|
||||
resources.ApplyResources(this.statusLabel, "statusLabel");
|
||||
this.statusLabel.Name = "statusLabel";
|
||||
this.statusLabel.Overflow = System.Windows.Forms.ToolStripItemOverflow.Never;
|
||||
this.statusLabel.Spring = true;
|
||||
//
|
||||
// statusLabelAlerts
|
||||
//
|
||||
@ -1947,6 +1949,12 @@ namespace XenAdmin
|
||||
this.statusLabelErrors.VisitedLinkColor = System.Drawing.SystemColors.ControlDarkDark;
|
||||
this.statusLabelErrors.Click += new System.EventHandler(this.statusLabelErrors_Click);
|
||||
//
|
||||
// toolStripMenuItemRotateSecret
|
||||
//
|
||||
this.toolStripMenuItemRotateSecret.Name = "toolStripMenuItemRotateSecret";
|
||||
this.toolStripMenuItemRotateSecret.Command = new XenAdmin.Commands.RotatePoolSecretCommand();
|
||||
resources.ApplyResources(this.toolStripMenuItemRotateSecret, "toolStripMenuItemRotateSecret");
|
||||
//
|
||||
// MainWindow
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
@ -2222,6 +2230,7 @@ namespace XenAdmin
|
||||
private System.Windows.Forms.ToolStripStatusLabel statusLabelAlerts;
|
||||
private System.Windows.Forms.ToolStripStatusLabel statusLabelUpdates;
|
||||
private System.Windows.Forms.ToolStripStatusLabel statusLabelErrors;
|
||||
private XenAdmin.Commands.CommandToolStripMenuItem toolStripMenuItemRotateSecret;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1663,18 +1663,11 @@ namespace XenAdmin
|
||||
sendCtrlAltDelToolStripMenuItem.Enabled = (TheTabControl.SelectedTab == TabPageConsole) && vm && ((VM)SelectionManager.Selection.First).power_state == vm_power_state.Running;
|
||||
|
||||
IXenConnection conn = SelectionManager.Selection.GetConnectionOfAllItems();
|
||||
if (SelectionManager.Selection.Count > 0 && (Helpers.GetMaster(conn) != null) && (Helpers.FalconOrGreater(conn)))
|
||||
{
|
||||
assignSnapshotScheduleToolStripMenuItem.Available = true;
|
||||
VMSnapshotScheduleToolStripMenuItem.Available = true;
|
||||
|
||||
}
|
||||
else /* hide VMSS */
|
||||
{
|
||||
assignSnapshotScheduleToolStripMenuItem.Available = false;
|
||||
VMSnapshotScheduleToolStripMenuItem.Available = false;
|
||||
}
|
||||
|
||||
bool vmssOn = conn != null && Helpers.FalconOrGreater(conn);
|
||||
assignSnapshotScheduleToolStripMenuItem.Available = vmssOn;
|
||||
VMSnapshotScheduleToolStripMenuItem.Available = vmssOn;
|
||||
|
||||
templatesToolStripMenuItem1.Checked = Properties.Settings.Default.DefaultTemplatesVisible;
|
||||
customTemplatesToolStripMenuItem.Checked = Properties.Settings.Default.UserTemplatesVisible;
|
||||
localStorageToolStripMenuItem.Checked = Properties.Settings.Default.LocalSRsVisible;
|
||||
@ -1683,6 +1676,9 @@ namespace XenAdmin
|
||||
conversionToolStripMenuItem.Available = conn != null && conn.Cache.VMs.Any(v => v.IsConversionVM());
|
||||
installToolsToolStripMenuItem.Available = SelectionManager.Selection.Any(v => !Helpers.StockholmOrGreater(v.Connection));
|
||||
toolStripMenuItemInstallCertificate.Available = Helpers.StockholmOrGreater(conn);
|
||||
toolStripMenuItemRotateSecret.Available = SelectionManager.Selection.Any(s =>
|
||||
s.Connection != null && Helpers.StockholmOrGreater(s.Connection) &&
|
||||
!s.Connection.Cache.Hosts.Any(Host.RestrictPoolSecretRotation));
|
||||
}
|
||||
|
||||
private void xenSourceOnTheWebToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
|
@ -1822,13 +1822,13 @@
|
||||
<value>163, 5</value>
|
||||
</metadata>
|
||||
<data name="ShowToolbarMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>146, 22</value>
|
||||
<value>145, 22</value>
|
||||
</data>
|
||||
<data name="ShowToolbarMenuItem.Text" xml:space="preserve">
|
||||
<value>Show &Toolbar</value>
|
||||
</data>
|
||||
<data name="ToolBarContextMenu.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>147, 26</value>
|
||||
<value>146, 26</value>
|
||||
</data>
|
||||
<data name=">>ToolBarContextMenu.Name" xml:space="preserve">
|
||||
<value>ToolBarContextMenu</value>
|
||||
@ -2040,6 +2040,12 @@
|
||||
<data name="changePoolPasswordToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Change Server Pass&word...</value>
|
||||
</data>
|
||||
<data name="toolStripMenuItemRotateSecret.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>277, 22</value>
|
||||
</data>
|
||||
<data name="toolStripMenuItemRotateSecret.Text" xml:space="preserve">
|
||||
<value>Rotate &Pool Secret</value>
|
||||
</data>
|
||||
<data name="toolStripMenuItem1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>274, 6</value>
|
||||
</data>
|
||||
@ -2245,13 +2251,13 @@
|
||||
<value>Remove Crash Dump &Files</value>
|
||||
</data>
|
||||
<data name="ChangeRootPasswordToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>180, 22</value>
|
||||
<value>161, 22</value>
|
||||
</data>
|
||||
<data name="ChangeRootPasswordToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>&Change...</value>
|
||||
</data>
|
||||
<data name="forgetSavedPasswordToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>180, 22</value>
|
||||
<value>161, 22</value>
|
||||
</data>
|
||||
<data name="forgetSavedPasswordToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>&Forget Password</value>
|
||||
@ -2299,130 +2305,130 @@
|
||||
<value>&Server</value>
|
||||
</data>
|
||||
<data name="NewVmToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>243, 22</value>
|
||||
<value>242, 22</value>
|
||||
</data>
|
||||
<data name="NewVmToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>&New VM...</value>
|
||||
</data>
|
||||
<data name="startShutdownToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>243, 22</value>
|
||||
<value>242, 22</value>
|
||||
</data>
|
||||
<data name="startShutdownToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>&Start/Shut down</value>
|
||||
</data>
|
||||
<data name="resumeOnToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>243, 22</value>
|
||||
<value>242, 22</value>
|
||||
</data>
|
||||
<data name="resumeOnToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Res&ume on Server</value>
|
||||
</data>
|
||||
<data name="relocateToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>243, 22</value>
|
||||
<value>242, 22</value>
|
||||
</data>
|
||||
<data name="relocateToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>M&igrate to Server</value>
|
||||
</data>
|
||||
<data name="startOnHostToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>243, 22</value>
|
||||
<value>242, 22</value>
|
||||
</data>
|
||||
<data name="startOnHostToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Start &on Server</value>
|
||||
</data>
|
||||
<data name="toolStripSeparator20.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>240, 6</value>
|
||||
<value>239, 6</value>
|
||||
</data>
|
||||
<data name="assignSnapshotScheduleToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>243, 22</value>
|
||||
<value>242, 22</value>
|
||||
</data>
|
||||
<data name="assignSnapshotScheduleToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Assign to Snaps&hot Schedule...</value>
|
||||
</data>
|
||||
<data name="assignToVirtualApplianceToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>243, 22</value>
|
||||
<value>242, 22</value>
|
||||
</data>
|
||||
<data name="assignToVirtualApplianceToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Assign to &vApp</value>
|
||||
</data>
|
||||
<data name="toolStripMenuItem9.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>240, 6</value>
|
||||
<value>239, 6</value>
|
||||
</data>
|
||||
<data name="copyVMtoSharedStorageMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>243, 22</value>
|
||||
<value>242, 22</value>
|
||||
</data>
|
||||
<data name="copyVMtoSharedStorageMenuItem.Text" xml:space="preserve">
|
||||
<value>&Copy VM</value>
|
||||
</data>
|
||||
<data name="MoveVMToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>243, 22</value>
|
||||
<value>242, 22</value>
|
||||
</data>
|
||||
<data name="MoveVMToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>&Move VM</value>
|
||||
</data>
|
||||
<data name="snapshotToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>243, 22</value>
|
||||
<value>242, 22</value>
|
||||
</data>
|
||||
<data name="snapshotToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Ta&ke a Snapshot</value>
|
||||
</data>
|
||||
<data name="convertToTemplateToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>243, 22</value>
|
||||
<value>242, 22</value>
|
||||
</data>
|
||||
<data name="convertToTemplateToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Convert to &Template</value>
|
||||
</data>
|
||||
<data name="exportToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>243, 22</value>
|
||||
<value>242, 22</value>
|
||||
</data>
|
||||
<data name="exportToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>&Export...</value>
|
||||
</data>
|
||||
<data name="disableCbtToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>243, 22</value>
|
||||
<value>242, 22</value>
|
||||
</data>
|
||||
<data name="disableCbtToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>D&isable Changed Block Tracking</value>
|
||||
</data>
|
||||
<data name="enablePVSReadcachingToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>243, 22</value>
|
||||
<value>242, 22</value>
|
||||
</data>
|
||||
<data name="disablePVSReadcachingToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>243, 22</value>
|
||||
<value>242, 22</value>
|
||||
</data>
|
||||
<data name="toolStripMenuItem12.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>240, 6</value>
|
||||
<value>239, 6</value>
|
||||
</data>
|
||||
<data name="installToolsToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>243, 22</value>
|
||||
<value>242, 22</value>
|
||||
</data>
|
||||
<data name="installToolsToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Inst&all [Citrix VM Tools]</value>
|
||||
</data>
|
||||
<data name="sendCtrlAltDelToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>243, 22</value>
|
||||
<value>242, 22</value>
|
||||
</data>
|
||||
<data name="sendCtrlAltDelToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Send Ctrl+&Alt+Del</value>
|
||||
</data>
|
||||
<data name="toolStripSeparator5.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>240, 6</value>
|
||||
<value>239, 6</value>
|
||||
</data>
|
||||
<data name="uninstallToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>243, 22</value>
|
||||
<value>242, 22</value>
|
||||
</data>
|
||||
<data name="uninstallToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>&Delete VM</value>
|
||||
</data>
|
||||
<data name="toolStripSeparator10.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>240, 6</value>
|
||||
<value>239, 6</value>
|
||||
</data>
|
||||
<data name="pluginItemsPlaceHolderToolStripMenuItem4.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>243, 22</value>
|
||||
<value>242, 22</value>
|
||||
</data>
|
||||
<data name="pluginItemsPlaceHolderToolStripMenuItem4.Text" xml:space="preserve">
|
||||
<value>PluginItemsPlaceHolder</value>
|
||||
</data>
|
||||
<data name="VMPropertiesToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>243, 22</value>
|
||||
<value>242, 22</value>
|
||||
</data>
|
||||
<data name="VMPropertiesToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>P&roperties</value>
|
||||
@ -2815,7 +2821,7 @@
|
||||
<value>None</value>
|
||||
</data>
|
||||
<data name="statusLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>498, 22</value>
|
||||
<value>529, 22</value>
|
||||
</data>
|
||||
<data name="statusLabel.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
|
||||
<value>MiddleLeft</value>
|
||||
@ -3411,6 +3417,12 @@
|
||||
<data name=">>toolStripSeparator23.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>toolStripMenuItemInstallCertificate.Name" xml:space="preserve">
|
||||
<value>toolStripMenuItemInstallCertificate</value>
|
||||
</data>
|
||||
<data name=">>toolStripMenuItemInstallCertificate.Type" xml:space="preserve">
|
||||
<value>XenAdmin.Commands.CommandToolStripMenuItem, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>maintenanceModeToolStripMenuItem1.Name" xml:space="preserve">
|
||||
<value>maintenanceModeToolStripMenuItem1</value>
|
||||
</data>
|
||||
@ -3975,23 +3987,17 @@
|
||||
<data name=">>securityGroupsToolStripMenuItem.Type" xml:space="preserve">
|
||||
<value>XenAdmin.Commands.CommandToolStripMenuItem, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>statusLabel.Name" xml:space="preserve">
|
||||
<value>statusLabel</value>
|
||||
</data>
|
||||
<data name=">>statusLabel.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>statusProgressBar.Name" xml:space="preserve">
|
||||
<value>statusProgressBar</value>
|
||||
</data>
|
||||
<data name=">>statusProgressBar.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripProgressBar, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>toolStripMenuItemInstallCertificate.Name" xml:space="preserve">
|
||||
<value>toolStripMenuItemInstallCertificate</value>
|
||||
<data name=">>statusLabel.Name" xml:space="preserve">
|
||||
<value>statusLabel</value>
|
||||
</data>
|
||||
<data name=">>toolStripMenuItemInstallCertificate.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<data name=">>statusLabel.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>statusLabelAlerts.Name" xml:space="preserve">
|
||||
<value>statusLabelAlerts</value>
|
||||
@ -4011,6 +4017,12 @@
|
||||
<data name=">>statusLabelErrors.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>toolStripMenuItemRotateSecret.Name" xml:space="preserve">
|
||||
<value>toolStripMenuItemRotateSecret</value>
|
||||
</data>
|
||||
<data name=">>toolStripMenuItemRotateSecret.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>MainWindow</value>
|
||||
</data>
|
||||
|
15
XenAdmin/Properties/Settings.Designer.cs
generated
15
XenAdmin/Properties/Settings.Designer.cs
generated
@ -12,7 +12,7 @@ namespace XenAdmin.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.5.0.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.6.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
@ -850,5 +850,18 @@ namespace XenAdmin.Properties {
|
||||
this["IgnoreOvfValidationWarnings"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("True")]
|
||||
[global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
|
||||
public bool RemindChangePassword {
|
||||
get {
|
||||
return ((bool)(this["RemindChangePassword"]));
|
||||
}
|
||||
set {
|
||||
this["RemindChangePassword"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -197,5 +197,8 @@
|
||||
<Setting Name="IgnoreOvfValidationWarnings" Roaming="true" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
<Setting Name="RemindChangePassword" Roaming="true" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">True</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
@ -660,6 +660,7 @@ namespace XenAdmin
|
||||
|
||||
log.Info($"=== WarnUnrecognizedCertificate: {Properties.Settings.Default.WarnUnrecognizedCertificate}");
|
||||
log.Info($"=== WarnChangedCertificate: {Properties.Settings.Default.WarnChangedCertificate}");
|
||||
log.Info($"=== RemindChangePassword: {Properties.Settings.Default.RemindChangePassword}");
|
||||
|
||||
if (!Helpers.CommonCriteriaCertificationRelease)
|
||||
{
|
||||
|
@ -802,27 +802,48 @@ namespace XenAdmin.TabPages
|
||||
if (!ButtonRemove.Enabled)
|
||||
return;
|
||||
|
||||
List<Subject> subjectsToRemove = new List<Subject>();
|
||||
foreach (AdSubjectRow r in GridViewSubjectList.SelectedRows)
|
||||
subjectsToRemove.Add(r.subject);
|
||||
var subjectsToRemove = GridViewSubjectList.SelectedRows.Cast<AdSubjectRow>().Select(r => r.subject).ToList();
|
||||
if (subjectsToRemove.Count < 1)
|
||||
return;
|
||||
|
||||
var removeMessage = subjectsToRemove.Count == 1
|
||||
? string.Format(Messages.QUESTION_REMOVE_AD_USER_ONE, subjectsToRemove[0].DisplayName ?? subjectsToRemove[0].SubjectName)
|
||||
: string.Format(Messages.QUESTION_REMOVE_AD_USER_MANY, subjectsToRemove.Count);
|
||||
|
||||
DialogResult questionDialog;
|
||||
using (var dlg = new NoIconDialog(removeMessage,
|
||||
string adminMessage = null;
|
||||
var conn = subjectsToRemove.FirstOrDefault(s => s.Connection != null)?.Connection;
|
||||
|
||||
if (conn != null && Helpers.StockholmOrGreater(conn) && !conn.Cache.Hosts.Any(Host.RestrictPoolSecretRotation))
|
||||
{
|
||||
var poolAdminsToRemove = (from Subject s in subjectsToRemove
|
||||
let roles = s.Connection.ResolveAll(s.roles)
|
||||
where roles.Any(r => r.name_label == Role.MR_ROLE_POOL_ADMIN)
|
||||
select s).ToList();
|
||||
|
||||
if (subjectsToRemove.Count == poolAdminsToRemove.Count)
|
||||
adminMessage = poolAdminsToRemove.Count == 1
|
||||
? Messages.QUESTION_ADMIN_EXIT_PROCEDURE_ONE
|
||||
: Messages.QUESTION_ADMIN_EXIT_PROCEDURE_MANY;
|
||||
else if (poolAdminsToRemove.Count > 0)
|
||||
adminMessage = poolAdminsToRemove.Count == 1
|
||||
? Messages.QUESTION_ADMIN_EXIT_PROCEDURE_ONE_OF_MANY
|
||||
: string.Format(Messages.QUESTION_ADMIN_EXIT_PROCEDURE_SOME_OF_MANY, poolAdminsToRemove.Count);
|
||||
|
||||
if (!string.IsNullOrEmpty(adminMessage))
|
||||
removeMessage = string.Format("{0}\n\n{1} {2}", removeMessage, adminMessage, Messages.QUESTION_ADMIN_EXIT_PROCEDURE_ADVISORY);
|
||||
}
|
||||
|
||||
using (var dlg = new WarningDialog(removeMessage,
|
||||
ThreeButtonDialog.ButtonYes,
|
||||
new ThreeButtonDialog.TBDButton(Messages.NO_BUTTON_CAPTION, DialogResult.No, selected: true))
|
||||
{WindowTitle = Messages.AD_FEATURE_NAME})
|
||||
{
|
||||
questionDialog = dlg.ShowDialog(this);
|
||||
}
|
||||
//CA-64818: DialogResult can be No if the No button has been hit
|
||||
//or Cancel if the dialog has been closed from the control box
|
||||
|
||||
//CA-64818: DialogResult can be No if the No button has been hit
|
||||
//or Cancel if the dialog has been closed from the control box
|
||||
if (questionDialog != DialogResult.Yes)
|
||||
return;
|
||||
if (dlg.ShowDialog(this) != DialogResult.Yes)
|
||||
return;
|
||||
}
|
||||
|
||||
// Warn if user is revoking his currently-in-use credentials
|
||||
Session session = _connection.Session;
|
||||
@ -1029,26 +1050,20 @@ namespace XenAdmin.TabPages
|
||||
InvisibleMessages.UPSELL_LEARNMOREURL_TRIAL))
|
||||
dlg.ShowDialog(this);
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Double check, this method is called from a context menu as well and the state could have changed under it
|
||||
if (!ButtonChangeRoles.Enabled)
|
||||
return;
|
||||
|
||||
List<Subject> selectedSubjects = new List<Subject>();
|
||||
foreach (DataGridViewRow r in GridViewSubjectList.SelectedRows)
|
||||
{
|
||||
AdSubjectRow selectedRow = (AdSubjectRow)r;
|
||||
// Should not be here, you can't change the root man!
|
||||
if (selectedRow.IsLocalRootRow)
|
||||
continue;
|
||||
selectedSubjects.Add(selectedRow.subject);
|
||||
}
|
||||
var selectedSubjects = GridViewSubjectList.SelectedRows.Cast<AdSubjectRow>().Where(r => !r.IsLocalRootRow).Select(r => r.subject).ToList();
|
||||
|
||||
using (var dialog = new RoleSelectionDialog(_connection, selectedSubjects.ToArray()))
|
||||
dialog.ShowDialog(this);
|
||||
using (var dialog = new RoleSelectionDialog(_connection, selectedSubjects))
|
||||
if (dialog.ShowDialog(this) == DialogResult.OK)
|
||||
{
|
||||
foreach (Subject s in selectedSubjects)
|
||||
new AddRemoveRolesAction(_connection, s, dialog.SelectedRoles).RunAsync();
|
||||
}
|
||||
}
|
||||
|
||||
private void ButtonLogout_Click(object sender, EventArgs e)
|
||||
|
@ -117,6 +117,7 @@
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Commands\CrossPoolCopyVMCommand.cs" />
|
||||
<Compile Include="Commands\RotatePoolSecretCommand.cs" />
|
||||
<Compile Include="Commands\InstallCertificateCommand.cs" />
|
||||
<Compile Include="Commands\LaunchConversionManagerCommand.cs" />
|
||||
<Compile Include="Commands\CrossPoolMoveVMCommand.cs" />
|
||||
|
@ -17,7 +17,8 @@
|
||||
</setting>
|
||||
<setting name="ServerList" serializeAs="Xml">
|
||||
<value>
|
||||
<ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"/>
|
||||
<ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
|
||||
</value>
|
||||
</setting>
|
||||
<setting name="LocalSRsVisible" serializeAs="String">
|
||||
@ -54,7 +55,7 @@
|
||||
<value>0</value>
|
||||
</setting>
|
||||
<setting name="ProxyAddress" serializeAs="String">
|
||||
<value/>
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="ProxyPort" serializeAs="String">
|
||||
<value>80</value>
|
||||
@ -96,7 +97,7 @@
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="LatestXenCenterSeen" serializeAs="String">
|
||||
<value/>
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="SeenAllowUpdatesDialog" serializeAs="String">
|
||||
<value>False</value>
|
||||
@ -112,22 +113,24 @@
|
||||
</setting>
|
||||
<setting name="DisabledPlugins" serializeAs="Xml">
|
||||
<value>
|
||||
<ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"/>
|
||||
<ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
|
||||
</value>
|
||||
</setting>
|
||||
<setting name="IgnoreFirstRunWizards" serializeAs="Xml">
|
||||
<value>
|
||||
<ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"/>
|
||||
<ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
|
||||
</value>
|
||||
</setting>
|
||||
<setting name="ServerStatusPath" serializeAs="String">
|
||||
<value/>
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="RollingUpgradeWizardShowFirstPage" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="ApplicationVersion" serializeAs="String">
|
||||
<value/>
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="UncaptureShortcutKey" serializeAs="String">
|
||||
<value>0</value>
|
||||
@ -148,10 +151,10 @@
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="ProxyUsername" serializeAs="String">
|
||||
<value/>
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="ProxyPassword" serializeAs="String">
|
||||
<value/>
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="BypassProxyForServers" serializeAs="String">
|
||||
<value>False</value>
|
||||
@ -169,7 +172,7 @@
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="HelpLastUsed" serializeAs="String">
|
||||
<value/>
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="EjectSharedIsoOnUpdate" serializeAs="String">
|
||||
<value>False</value>
|
||||
@ -186,6 +189,9 @@
|
||||
<setting name="IgnoreOvfValidationWarnings" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="RemindChangePassword" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
</XenAdmin.Properties.Settings>
|
||||
</userSettings>
|
||||
|
||||
|
@ -30,6 +30,7 @@
|
||||
*/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using XenAdmin.Core;
|
||||
using XenAdmin.Network;
|
||||
using XenAPI;
|
||||
@ -41,11 +42,10 @@ namespace XenAdmin.Actions
|
||||
{
|
||||
private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private readonly List<Role> toAdd;
|
||||
private readonly List<Role> toRemove;
|
||||
private readonly List<Role> _newRoles;
|
||||
private readonly Subject subject;
|
||||
|
||||
public AddRemoveRolesAction(IXenConnection connection, Subject subject, List<Role> toAdd, List<Role> toRemove)
|
||||
public AddRemoveRolesAction(IXenConnection connection, Subject subject, List<Role> newRoles)
|
||||
: base(connection,
|
||||
string.Format(Messages.AD_ADDING_REMOVING_ROLES_ON, (subject.DisplayName ?? subject.SubjectName ?? subject.subject_identifier).Ellipsise(50)),
|
||||
Messages.AD_ADDING_REMOVING_ROLES,
|
||||
@ -56,32 +56,40 @@ namespace XenAdmin.Actions
|
||||
Pool = pool;
|
||||
else
|
||||
Host = Helpers.GetMaster(connection);
|
||||
this.toAdd = toAdd;
|
||||
this.toRemove = toRemove;
|
||||
|
||||
_newRoles = newRoles;
|
||||
this.subject = subject;
|
||||
}
|
||||
|
||||
protected override void Run()
|
||||
{
|
||||
var serverRoles = Connection.Cache.Roles.Where(r => r.subroles.Count > 0).ToList();
|
||||
|
||||
var toAdd = serverRoles.Where(role => _newRoles.Contains(role) &&
|
||||
!subject.roles.Contains(new XenRef<Role>(role.opaque_ref))).ToList();
|
||||
|
||||
var toRemove = serverRoles.Where(role => !_newRoles.Contains(role) &&
|
||||
subject.roles.Contains(new XenRef<Role>(role.opaque_ref))).ToList();
|
||||
|
||||
int count = toAdd.Count + toRemove.Count;
|
||||
int done = 0;
|
||||
var subj = subject.DisplayName ?? subject.SubjectName ?? subject.subject_identifier;
|
||||
|
||||
log.DebugFormat("Adding {0} roles on subject '{1}'.", toAdd.Count, subj);
|
||||
foreach (Role r in toAdd)
|
||||
{
|
||||
log.DebugFormat("Adding role {0} to subject '{1}'.", r.FriendlyName(), subj);
|
||||
Subject.add_to_roles(Session, subject.opaque_ref, r.opaque_ref);
|
||||
done++;
|
||||
PercentComplete = (100 * done) / count;
|
||||
PercentComplete = 100 * ++done / count;
|
||||
}
|
||||
|
||||
log.DebugFormat("Removing {0} roles on subject '{1}'.", toRemove.Count, subj);
|
||||
foreach (Role r in toRemove)
|
||||
{
|
||||
log.DebugFormat("Removing role {0} from subject '{1}'.", r.FriendlyName(), subj);
|
||||
Subject.remove_from_roles(Session, subject.opaque_ref, r.opaque_ref);
|
||||
done++;
|
||||
PercentComplete = (100 * done) / count;
|
||||
PercentComplete = 100 * ++done / count;
|
||||
}
|
||||
|
||||
Description = Messages.COMPLETED;
|
||||
}
|
||||
}
|
||||
|
139
XenModel/Messages.Designer.cs
generated
139
XenModel/Messages.Designer.cs
generated
@ -3774,7 +3774,7 @@ namespace XenAdmin {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Adding/removing roles from subject.
|
||||
/// Looks up a localized string similar to Assigning new roles to subject.
|
||||
/// </summary>
|
||||
public static string AD_ADDING_REMOVING_ROLES {
|
||||
get {
|
||||
@ -3783,7 +3783,7 @@ namespace XenAdmin {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Adding/removing roles from subject '{0}'.
|
||||
/// Looks up a localized string similar to Assigning new roles to subject '{0}'.
|
||||
/// </summary>
|
||||
public static string AD_ADDING_REMOVING_ROLES_ON {
|
||||
get {
|
||||
@ -7269,15 +7269,6 @@ namespace XenAdmin {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Please type the root password for '{0}':.
|
||||
/// </summary>
|
||||
public static string CHANGEPASS_ROOT_PASS {
|
||||
get {
|
||||
return ResourceManager.GetString("CHANGEPASS_ROOT_PASS", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Pool '{0}' cannot have WLB enabled.
|
||||
/// </summary>
|
||||
@ -31268,9 +31259,52 @@ namespace XenAdmin {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to You are about to log out {0} users.
|
||||
///
|
||||
///Do you want to continue?.
|
||||
/// Looks up a localized string similar to To reduce the risk of unauthorized access to your system, it is recommended that you also change the server root password and rotate the pool secret..
|
||||
/// </summary>
|
||||
public static string QUESTION_ADMIN_EXIT_PROCEDURE_ADVISORY {
|
||||
get {
|
||||
return ResourceManager.GetString("QUESTION_ADMIN_EXIT_PROCEDURE_ADVISORY", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The users you are about to remove are Pool Administrators..
|
||||
/// </summary>
|
||||
public static string QUESTION_ADMIN_EXIT_PROCEDURE_MANY {
|
||||
get {
|
||||
return ResourceManager.GetString("QUESTION_ADMIN_EXIT_PROCEDURE_MANY", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The user you are about to remove is a Pool Administrator..
|
||||
/// </summary>
|
||||
public static string QUESTION_ADMIN_EXIT_PROCEDURE_ONE {
|
||||
get {
|
||||
return ResourceManager.GetString("QUESTION_ADMIN_EXIT_PROCEDURE_ONE", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to One of the users you are about to remove is a Pool Administrator..
|
||||
/// </summary>
|
||||
public static string QUESTION_ADMIN_EXIT_PROCEDURE_ONE_OF_MANY {
|
||||
get {
|
||||
return ResourceManager.GetString("QUESTION_ADMIN_EXIT_PROCEDURE_ONE_OF_MANY", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to {0} of the users you are about to remove are Pool Administrators..
|
||||
/// </summary>
|
||||
public static string QUESTION_ADMIN_EXIT_PROCEDURE_SOME_OF_MANY {
|
||||
get {
|
||||
return ResourceManager.GetString("QUESTION_ADMIN_EXIT_PROCEDURE_SOME_OF_MANY", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Are you sure you want to log out these {0} users?.
|
||||
/// </summary>
|
||||
public static string QUESTION_LOGOUT_AD_USER_MANY {
|
||||
get {
|
||||
@ -31279,9 +31313,7 @@ namespace XenAdmin {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to You are about to log out the user '{0}'.
|
||||
///
|
||||
///Do you want to continue?.
|
||||
/// Looks up a localized string similar to Are you sure you want to log out the user '{0}'?.
|
||||
/// </summary>
|
||||
public static string QUESTION_LOGOUT_AD_USER_ONE {
|
||||
get {
|
||||
@ -31290,18 +31322,7 @@ namespace XenAdmin {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to ?.
|
||||
/// </summary>
|
||||
public static string QUESTION_MARK {
|
||||
get {
|
||||
return ResourceManager.GetString("QUESTION_MARK", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to You are about to remove {0} users.
|
||||
///
|
||||
///Do you want to continue?.
|
||||
/// Looks up a localized string similar to Are you sure you want to remove these {0} users?.
|
||||
/// </summary>
|
||||
public static string QUESTION_REMOVE_AD_USER_MANY {
|
||||
get {
|
||||
@ -31310,9 +31331,7 @@ namespace XenAdmin {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to You are about to remove the user '{0}'.
|
||||
///
|
||||
///Do you want to continue?.
|
||||
/// Looks up a localized string similar to Are you sure you want to remove the user '{0}'?.
|
||||
/// </summary>
|
||||
public static string QUESTION_REMOVE_AD_USER_ONE {
|
||||
get {
|
||||
@ -32784,6 +32803,62 @@ namespace XenAdmin {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to You cannot rotate the pool secret when HA is on..
|
||||
/// </summary>
|
||||
public static string ROTATE_POOL_SECRET_HA {
|
||||
get {
|
||||
return ResourceManager.GetString("ROTATE_POOL_SECRET_HA", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Rotate &Pool Secret.
|
||||
/// </summary>
|
||||
public static string ROTATE_POOL_SECRET_MENU {
|
||||
get {
|
||||
return ResourceManager.GetString("ROTATE_POOL_SECRET_MENU", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to A {0} user does not have sufficient permissions to rotate the pool secret. Please login using an account with one of the following roles:
|
||||
///
|
||||
///{1}.
|
||||
/// </summary>
|
||||
public static string ROTATE_POOL_SECRET_RBAC_RESTRICTION {
|
||||
get {
|
||||
return ResourceManager.GetString("ROTATE_POOL_SECRET_RBAC_RESTRICTION", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to To reduce the risk of unauthorized access to your system, it is recommended that you also change the server root password..
|
||||
/// </summary>
|
||||
public static string ROTATE_POOL_SECRET_REMIND_CHANGE_PASSWORD {
|
||||
get {
|
||||
return ResourceManager.GetString("ROTATE_POOL_SECRET_REMIND_CHANGE_PASSWORD", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to You cannot rotate the pool secret when a Rolling Pool Upgrade is in progress..
|
||||
/// </summary>
|
||||
public static string ROTATE_POOL_SECRET_RPU {
|
||||
get {
|
||||
return ResourceManager.GetString("ROTATE_POOL_SECRET_RPU", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Rotating pool secret.
|
||||
/// </summary>
|
||||
public static string ROTATE_POOL_SECRET_TITLE {
|
||||
get {
|
||||
return ResourceManager.GetString("ROTATE_POOL_SECRET_TITLE", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to {0} could be skipped..
|
||||
/// </summary>
|
||||
|
@ -1545,10 +1545,10 @@ It is strongly recommended that you Cancel and apply the latest version of the p
|
||||
<value>Adding/removing users from Active Directory ACL on '{0}'</value>
|
||||
</data>
|
||||
<data name="AD_ADDING_REMOVING_ROLES" xml:space="preserve">
|
||||
<value>Adding/removing roles from subject</value>
|
||||
<value>Assigning new roles to subject</value>
|
||||
</data>
|
||||
<data name="AD_ADDING_REMOVING_ROLES_ON" xml:space="preserve">
|
||||
<value>Adding/removing roles from subject '{0}'</value>
|
||||
<value>Assigning new roles to subject '{0}'</value>
|
||||
</data>
|
||||
<data name="AD_ALWAYS_GRANTED_ACCESS" xml:space="preserve">
|
||||
<value>(Always granted access)</value>
|
||||
@ -2599,9 +2599,6 @@ This will cancel compilation of the status report.</value>
|
||||
<data name="CHANGEPASS_DIALOG_TITLE" xml:space="preserve">
|
||||
<value>Change Server Password - {0}</value>
|
||||
</data>
|
||||
<data name="CHANGEPASS_ROOT_PASS" xml:space="preserve">
|
||||
<value>Please type the root password for '{0}':</value>
|
||||
</data>
|
||||
<data name="CHANGE_POLICY_STATUS" xml:space="preserve">
|
||||
<value>Change policy '{0}' status</value>
|
||||
</data>
|
||||
@ -10842,28 +10839,32 @@ Press OK to continue the wizard and return to the server and follow the instruct
|
||||
<data name="QUERY_PERCENT_OF_CPUS" xml:space="preserve">
|
||||
<value>{0}% of {1} CPUs</value>
|
||||
</data>
|
||||
<data name="QUESTION_ADMIN_EXIT_PROCEDURE_ADVISORY" xml:space="preserve">
|
||||
<value>To reduce the risk of unauthorized access to your system, it is recommended that you also change the server root password and rotate the pool secret.</value>
|
||||
</data>
|
||||
<data name="QUESTION_ADMIN_EXIT_PROCEDURE_MANY" xml:space="preserve">
|
||||
<value>The users you are about to remove are Pool Administrators.</value>
|
||||
</data>
|
||||
<data name="QUESTION_ADMIN_EXIT_PROCEDURE_ONE" xml:space="preserve">
|
||||
<value>The user you are about to remove is a Pool Administrator.</value>
|
||||
</data>
|
||||
<data name="QUESTION_ADMIN_EXIT_PROCEDURE_ONE_OF_MANY" xml:space="preserve">
|
||||
<value>One of the users you are about to remove is a Pool Administrator.</value>
|
||||
</data>
|
||||
<data name="QUESTION_ADMIN_EXIT_PROCEDURE_SOME_OF_MANY" xml:space="preserve">
|
||||
<value>{0} of the users you are about to remove are Pool Administrators.</value>
|
||||
</data>
|
||||
<data name="QUESTION_LOGOUT_AD_USER_MANY" xml:space="preserve">
|
||||
<value>You are about to log out {0} users.
|
||||
|
||||
Do you want to continue?</value>
|
||||
<value>Are you sure you want to log out these {0} users?</value>
|
||||
</data>
|
||||
<data name="QUESTION_LOGOUT_AD_USER_ONE" xml:space="preserve">
|
||||
<value>You are about to log out the user '{0}'.
|
||||
|
||||
Do you want to continue?</value>
|
||||
</data>
|
||||
<data name="QUESTION_MARK" xml:space="preserve">
|
||||
<value>?</value>
|
||||
<value>Are you sure you want to log out the user '{0}'?</value>
|
||||
</data>
|
||||
<data name="QUESTION_REMOVE_AD_USER_MANY" xml:space="preserve">
|
||||
<value>You are about to remove {0} users.
|
||||
|
||||
Do you want to continue?</value>
|
||||
<value>Are you sure you want to remove these {0} users?</value>
|
||||
</data>
|
||||
<data name="QUESTION_REMOVE_AD_USER_ONE" xml:space="preserve">
|
||||
<value>You are about to remove the user '{0}'.
|
||||
|
||||
Do you want to continue?</value>
|
||||
<value>Are you sure you want to remove the user '{0}'?</value>
|
||||
</data>
|
||||
<data name="QUIESCED_SNAPSHOTS" xml:space="preserve">
|
||||
<value>Quiesced snapshots</value>
|
||||
@ -11378,6 +11379,26 @@ The master must be upgraded first, so if you skip the master, the rolling pool u
|
||||
<data name="ROLLING_UPGRADE_WARNING_ONE" xml:space="preserve">
|
||||
<value>The rolling pool upgrade process was completed with warnings.</value>
|
||||
</data>
|
||||
<data name="ROTATE_POOL_SECRET_HA" xml:space="preserve">
|
||||
<value>You cannot rotate the pool secret when HA is on.</value>
|
||||
</data>
|
||||
<data name="ROTATE_POOL_SECRET_MENU" xml:space="preserve">
|
||||
<value>Rotate &Pool Secret</value>
|
||||
</data>
|
||||
<data name="ROTATE_POOL_SECRET_RBAC_RESTRICTION" xml:space="preserve">
|
||||
<value>A {0} user does not have sufficient permissions to rotate the pool secret. Please login using an account with one of the following roles:
|
||||
|
||||
{1}</value>
|
||||
</data>
|
||||
<data name="ROTATE_POOL_SECRET_REMIND_CHANGE_PASSWORD" xml:space="preserve">
|
||||
<value>To reduce the risk of unauthorized access to your system, it is recommended that you also change the server root password.</value>
|
||||
</data>
|
||||
<data name="ROTATE_POOL_SECRET_RPU" xml:space="preserve">
|
||||
<value>You cannot rotate the pool secret when a Rolling Pool Upgrade is in progress.</value>
|
||||
</data>
|
||||
<data name="ROTATE_POOL_SECRET_TITLE" xml:space="preserve">
|
||||
<value>Rotating pool secret</value>
|
||||
</data>
|
||||
<data name="RPU_WIZARD_ERROR_SKIP_MSG" xml:space="preserve">
|
||||
<value>{0} could be skipped.</value>
|
||||
</data>
|
||||
|
@ -308,6 +308,11 @@ namespace XenAPI
|
||||
return !BoolKey(h.license_params, "enable_xha");
|
||||
}
|
||||
|
||||
public static bool RestrictPoolSecretRotation(Host h)
|
||||
{
|
||||
return BoolKeyPreferTrue(h.license_params, "restrict_pool_secret_rotation");
|
||||
}
|
||||
|
||||
public static bool RestrictAlerts(Host h)
|
||||
{
|
||||
return BoolKeyPreferTrue(h.license_params, "restrict_email_alerting");
|
||||
|
2
XenModel/XenAPI/FriendlyErrorNames.Designer.cs
generated
2
XenModel/XenAPI/FriendlyErrorNames.Designer.cs
generated
@ -1348,7 +1348,7 @@ namespace XenAPI {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The master says the server is not known to it. Perhaps the server was deleted from the master's database?.
|
||||
/// Looks up a localized string similar to The master says the server is not known to it. Is the server in the master's database and pointing to the correct master? Are all servers using the same pool secret?.
|
||||
/// </summary>
|
||||
public static string HOST_UNKNOWN_TO_MASTER {
|
||||
get {
|
||||
|
@ -553,7 +553,7 @@
|
||||
<value>The server is still booting.</value>
|
||||
</data>
|
||||
<data name="HOST_UNKNOWN_TO_MASTER" xml:space="preserve">
|
||||
<value>The master says the server is not known to it. Perhaps the server was deleted from the master's database?</value>
|
||||
<value>The master says the server is not known to it. Is the server in the master's database and pointing to the correct master? Are all servers using the same pool secret?</value>
|
||||
</data>
|
||||
<data name="ILLEGAL_VBD_DEVICE" xml:space="preserve">
|
||||
<value>The specified VBD device is not recognized: please use a non-negative integer</value>
|
||||
|
@ -1838,6 +1838,20 @@ namespace XenAPI
|
||||
return Rpc<XenRef<Task>>("Async.pool.remove_from_guest_agent_config", new JArray(session, _pool ?? "", _key ?? ""), serializer);
|
||||
}
|
||||
|
||||
public void pool_rotate_secret(string session)
|
||||
{
|
||||
var converters = new List<JsonConverter> {};
|
||||
var serializer = CreateSerializer(converters);
|
||||
Rpc("pool.rotate_secret", new JArray(session), serializer);
|
||||
}
|
||||
|
||||
public XenRef<Task> async_pool_rotate_secret(string session)
|
||||
{
|
||||
var converters = new List<JsonConverter> {new XenRefConverter<Task>()};
|
||||
var serializer = CreateSerializer(converters);
|
||||
return Rpc<XenRef<Task>>("Async.pool.rotate_secret", new JArray(session), serializer);
|
||||
}
|
||||
|
||||
public List<XenRef<Pool>> pool_get_all(string session)
|
||||
{
|
||||
var converters = new List<JsonConverter> {new XenRefListConverter<Pool>()};
|
||||
|
@ -2714,6 +2714,32 @@ namespace XenAPI
|
||||
return XenRef<Task>.Create(session.XmlRpcProxy.async_pool_remove_from_guest_agent_config(session.opaque_ref, _pool ?? "", _key ?? "").parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
public static void rotate_secret(Session session)
|
||||
{
|
||||
if (session.JsonRpcClient != null)
|
||||
session.JsonRpcClient.pool_rotate_secret(session.opaque_ref);
|
||||
else
|
||||
session.XmlRpcProxy.pool_rotate_secret(session.opaque_ref).parse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// First published in Unreleased.
|
||||
/// </summary>
|
||||
/// <param name="session">The session</param>
|
||||
public static XenRef<Task> async_rotate_secret(Session session)
|
||||
{
|
||||
if (session.JsonRpcClient != null)
|
||||
return session.JsonRpcClient.async_pool_rotate_secret(session.opaque_ref);
|
||||
else
|
||||
return XenRef<Task>.Create(session.XmlRpcProxy.async_pool_rotate_secret(session.opaque_ref).parse());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return a list of all the pools known to the system.
|
||||
/// First published in XenServer 4.0.
|
||||
|
@ -1070,6 +1070,14 @@ namespace XenAPI
|
||||
Response<string>
|
||||
async_pool_remove_from_guest_agent_config(string session, string _pool, string _key);
|
||||
|
||||
[XmlRpcMethod("pool.rotate_secret")]
|
||||
Response<string>
|
||||
pool_rotate_secret(string session);
|
||||
|
||||
[XmlRpcMethod("Async.pool.rotate_secret")]
|
||||
Response<string>
|
||||
async_pool_rotate_secret(string session);
|
||||
|
||||
[XmlRpcMethod("pool.get_all")]
|
||||
Response<string []>
|
||||
pool_get_all(string session);
|
||||
|
Loading…
Reference in New Issue
Block a user