@Math.Round(Convert.ToDecimal(resource.ContentLength) / 1024, 2) / @Math.Round(Convert.ToDecimal(resource.AllocatedSpace) / 1024, 2) @UI.GigabyteShort
+ @ViewDataHelper.BytesToSize(resource.ContentLength) / @ViewDataHelper.BytesToSize(resource.AllocatedSpace)
}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/WebsitePanel.WebDavPortal.csproj b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/WebsitePanel.WebDavPortal.csproj
index 8c5bfd40..5e8b2a86 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/WebsitePanel.WebDavPortal.csproj
+++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/WebsitePanel.WebDavPortal.csproj
@@ -183,6 +183,7 @@
Global.asax
+
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx
index 27590807..5269c27d 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx
@@ -5656,6 +5656,9 @@
Session host certificate not installed
+
+ RDS Server not added
+
Session host certificate has been installed
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Code/Helpers/RDSHelper.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Code/Helpers/RDSHelper.cs
index 9b7c00d2..625145e4 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Code/Helpers/RDSHelper.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Code/Helpers/RDSHelper.cs
@@ -57,6 +57,7 @@ namespace WebsitePanel.Portal
if (rdsServer.ItemId.HasValue)
{
rdsServer.Status = ES.Services.RDS.GetRdsServerStatus(rdsServer.ItemId.Value, rdsServer.FqdName);
+ rdsServer.SslAvailable = ES.Services.RDS.GetRdsCertificateByItemId(rdsServer.ItemId.Value) != null;
}
}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/RDS_Settings.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/RDS_Settings.ascx.resx
index 1b443a76..dd9c465d 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/RDS_Settings.ascx.resx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/RDS_Settings.ascx.resx
@@ -129,4 +129,22 @@
Certificate Password:
+
+ SSL Certificate
+
+
+ Select Certificate:
+
+
+ Expiry Date:
+
+
+ Issued By:
+
+
+ SAN Name:
+
+
+ Computers Root OU:
+
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/RDS_Settings.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/RDS_Settings.ascx
index 57dbeecb..415fd085 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/RDS_Settings.ascx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/RDS_Settings.ascx
@@ -1,17 +1,63 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="RDS_Settings.ascx.cs" Inherits="WebsitePanel.Portal.ProviderControls.RDS_Settings" %>
-
-
-
-
-
-
-
-
-
-
-
-
-
+<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -30,6 +76,15 @@
+
+
+
+
+
+
+
+
+
@@ -84,4 +139,6 @@
-
\ No newline at end of file
+
+
+
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/RDS_Settings.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/RDS_Settings.ascx.cs
index d85a1c61..8806b61d 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/RDS_Settings.ascx.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/RDS_Settings.ascx.cs
@@ -26,8 +26,10 @@
// (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 AjaxControlToolkit;
using System;
using System.Collections.Generic;
+using System.Security.Cryptography.X509Certificates;
using System.Web.UI.WebControls;
using WebsitePanel.EnterpriseServer;
using WebsitePanel.Providers.Common;
@@ -39,7 +41,7 @@ namespace WebsitePanel.Portal.ProviderControls
{
protected void Page_Load(object sender, EventArgs e)
{
-
+ FillCertificateInfo();
}
public string GWServers
@@ -54,6 +56,25 @@ namespace WebsitePanel.Portal.ProviderControls
}
}
+ private void FillCertificateInfo()
+ {
+ var certificate = ES.Services.RDS.GetRdsCertificateByServiceId(PanelRequest.ServiceId);
+
+ if (certificate != null)
+ {
+ var array = Convert.FromBase64String(certificate.Hash);
+ char[] chars = new char[array.Length / sizeof(char)];
+ System.Buffer.BlockCopy(array, 0, chars, 0, array.Length);
+ string password = new string(chars);
+ plCertificateInfo.Visible = true;
+ byte[] content = Convert.FromBase64String(certificate.Content);
+ var x509 = new X509Certificate2(content, password);
+ lblIssuedBy.Text = x509.Issuer.Replace("CN=", "").Replace("OU=", "").Replace("O=", "").Replace("L=", "").Replace("S=", "").Replace("C=", "");
+ lblExpiryDate.Text = x509.NotAfter.ToLongDateString();
+ lblSanName.Text = x509.SubjectName.Name.Replace("CN=", "");
+ }
+ }
+
public void BindSettings(System.Collections.Specialized.StringDictionary settings)
{
txtConnectionBroker.Text = settings["ConnectionBroker"];
@@ -62,6 +83,7 @@ namespace WebsitePanel.Portal.ProviderControls
UpdateLyncServersGrid();
txtRootOU.Text = settings["RootOU"];
+ txtComputersRootOu.Text = settings["ComputersRootOU"];
txtPrimaryDomainController.Text = settings["PrimaryDomainController"];
if (!string.IsNullOrEmpty(settings["UseCentralNPS"]) && bool.TrueString == settings["UseCentralNPS"])
@@ -82,6 +104,7 @@ namespace WebsitePanel.Portal.ProviderControls
{
settings["ConnectionBroker"] = txtConnectionBroker.Text;
settings["RootOU"] = txtRootOU.Text;
+ settings["ComputersRootOU"] = txtComputersRootOu.Text;
settings["PrimaryDomainController"] = txtPrimaryDomainController.Text;
settings["UseCentralNPS"] = chkUseCentralNPS.Checked.ToString();
settings["CentralNPS"] = chkUseCentralNPS.Checked ? txtCentralNPS.Text : string.Empty;
@@ -163,7 +186,7 @@ namespace WebsitePanel.Portal.ProviderControls
GWServers = str.TrimEnd(';');
UpdateLyncServersGrid();
}
- }
+ }
}
public class GWServer
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/RDS_Settings.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/RDS_Settings.ascx.designer.cs
index 9e1ba55e..81ceb1a6 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/RDS_Settings.ascx.designer.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/RDS_Settings.ascx.designer.cs
@@ -12,6 +12,15 @@ namespace WebsitePanel.Portal.ProviderControls {
public partial class RDS_Settings {
+ ///
+ /// secCertificateSettings control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label secCertificateSettings;
+
///
/// upPFX control.
///
@@ -30,6 +39,51 @@ namespace WebsitePanel.Portal.ProviderControls {
///
protected global::System.Web.UI.WebControls.TextBox txtPFXInstallPassword;
+ ///
+ /// currentCertificate control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label currentCertificate;
+
+ ///
+ /// plCertificateInfo control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Panel plCertificateInfo;
+
+ ///
+ /// lblIssuedBy control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblIssuedBy;
+
+ ///
+ /// lblSanName control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblSanName;
+
+ ///
+ /// lblExpiryDate control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblExpiryDate;
+
///
/// lblConnectionBroker control.
///
@@ -84,6 +138,33 @@ namespace WebsitePanel.Portal.ProviderControls {
///
protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator4;
+ ///
+ /// lblComputersRootOU control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblComputersRootOU;
+
+ ///
+ /// txtComputersRootOu control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtComputersRootOu;
+
+ ///
+ /// RequiredFieldValidator1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator1;
+
///
/// lblPrimaryDomainController control.
///
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSCreateCollection.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSCreateCollection.ascx.cs
index 2d21ad7e..5f09adc8 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSCreateCollection.ascx.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSCreateCollection.ascx.cs
@@ -69,7 +69,7 @@ namespace WebsitePanel.Portal.RDS
}
catch (Exception ex)
{
- messageBox.ShowErrorMessage("RDSCOLLECTION_NOT_CREATED", ex);
+ ShowErrorMessage("RDSCOLLECTION_NOT_CREATED", ex);
}
}
}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSEditApplicationUsers.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSEditApplicationUsers.ascx.cs
index 2a9be753..a5731696 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSEditApplicationUsers.ascx.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSEditApplicationUsers.ascx.cs
@@ -52,6 +52,19 @@ namespace WebsitePanel.Portal.RDS
txtApplicationName.Text = remoteApp.DisplayName;
//var remoteAppUsers = organizationUsers.Where(x => applicationUsers.Contains(x.AccountName));
var remoteAppUsers = organizationUsers.Where(x => applicationUsers.Select(a => a.Split('\\').Last().ToLower()).Contains(x.SamAccountName.Split('\\').Last().ToLower()));
+ var localAdmins = ES.Services.RDS.GetRdsCollectionLocalAdmins(PanelRequest.CollectionID);
+
+ foreach(var user in remoteAppUsers)
+ {
+ if (localAdmins.Select(l => l.AccountName).Contains(user.AccountName))
+ {
+ user.IsVIP = true;
+ }
+ else
+ {
+ user.IsVIP = false;
+ }
+ }
users.SetUsers(remoteAppUsers.ToArray());
}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSEditCollectionUsers.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSEditCollectionUsers.ascx.cs
index 767eab4f..8af9191a 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSEditCollectionUsers.ascx.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSEditCollectionUsers.ascx.cs
@@ -27,6 +27,7 @@
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
+using System.Linq;
using System.Web.UI.WebControls;
using WebsitePanel.EnterpriseServer;
using WebsitePanel.Providers.Common;
@@ -45,6 +46,19 @@ namespace WebsitePanel.Portal.RDS
BindQuota();
var collectionUsers = ES.Services.RDS.GetRdsCollectionUsers(PanelRequest.CollectionID);
var collection = ES.Services.RDS.GetRdsCollection(PanelRequest.CollectionID);
+ var localAdmins = ES.Services.RDS.GetRdsCollectionLocalAdmins(PanelRequest.CollectionID);
+
+ foreach (var user in collectionUsers)
+ {
+ if (localAdmins.Select(l => l.AccountName).Contains(user.AccountName))
+ {
+ user.IsVIP = true;
+ }
+ else
+ {
+ user.IsVIP = false;
+ }
+ }
litCollectionName.Text = collection.DisplayName;
users.SetUsers(collectionUsers);
@@ -63,6 +77,12 @@ namespace WebsitePanel.Portal.RDS
{
usersQuota.QuotaAvailable = tenantStats.AllocatedRdsUsers - tenantStats.CreatedRdsUsers;
}
+
+ if (cntx.Quotas.ContainsKey(Quotas.RDS_USERS))
+ {
+ int rdsUsersCount = ES.Services.RDS.GetOrganizationRdsUsersCount(PanelRequest.ItemID);
+ users.ButtonAddEnabled = (!(cntx.Quotas[Quotas.RDS_USERS].QuotaAllocatedValue <= rdsUsersCount) || (cntx.Quotas[Quotas.RDS_USERS].QuotaAllocatedValue == -1));
+ }
}
private bool SaveRdsUsers()
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSLocalAdmins.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSLocalAdmins.ascx.cs
index 1ea540d9..7ce5ca79 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSLocalAdmins.ascx.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSLocalAdmins.ascx.cs
@@ -4,6 +4,8 @@ using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
+using WebsitePanel.Providers.HostedSolution;
+using WebsitePanel.Providers.RemoteDesktopServices;
namespace WebsitePanel.Portal.RDS
{
@@ -17,6 +19,12 @@ namespace WebsitePanel.Portal.RDS
var collection = ES.Services.RDS.GetRdsCollection(PanelRequest.CollectionID);
litCollectionName.Text = collection.DisplayName;
+
+ foreach(var user in collectionLocalAdmins)
+ {
+ user.IsVIP = false;
+ }
+
users.SetUsers(collectionLocalAdmins);
}
}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/RDSCollectionApps.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/RDSCollectionApps.ascx
index bbc141f1..36c6fb36 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/RDSCollectionApps.ascx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/RDSCollectionApps.ascx
@@ -28,6 +28,7 @@
+
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/RDSCollectionApps.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/RDSCollectionApps.ascx.cs
index 0474d715..47e39a3d 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/RDSCollectionApps.ascx.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/RDSCollectionApps.ascx.cs
@@ -136,7 +136,7 @@ namespace WebsitePanel.Portal.RDS.UserControls
var fullRemote = new StartMenuApp
{
DisplayName = string.Format("Full Desktop - {0}", host.ToLower()),
- FilePath = "%SystemRoot%\\system32\\mstsc.exe",
+ FilePath = "c:\\windows\\system32\\mstsc.exe",
RequiredCommandLine = string.Format("/v:{0}", host.ToLower())
};
@@ -213,6 +213,13 @@ namespace WebsitePanel.Portal.RDS.UserControls
app.DisplayName = ((LinkButton)row.FindControl("lnkDisplayName")).Text;
app.FilePath = ((HiddenField)row.FindControl("hfFilePath")).Value;
app.RequiredCommandLine = ((HiddenField)row.FindControl("hfRequiredCommandLine")).Value;
+ var users = ((HiddenField)row.FindControl("hfUsers")).Value;
+
+ if (!string.IsNullOrEmpty(users))
+ {
+ app.Users = new string[]{"New"};
+ }
+
if (state == SelectedState.All ||
(state == SelectedState.Selected && chkSelect.Checked) ||
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/RDSCollectionUsers.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/RDSCollectionUsers.ascx
index 4ba1e5c0..93432cd3 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/RDSCollectionUsers.ascx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/RDSCollectionUsers.ascx
@@ -23,8 +23,9 @@
-
+
+
@@ -81,6 +82,7 @@
+
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/RDSCollectionUsers.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/RDSCollectionUsers.ascx.cs
index fdd2e6ce..76837a86 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/RDSCollectionUsers.ascx.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/RDSCollectionUsers.ascx.cs
@@ -42,6 +42,18 @@ namespace WebsitePanel.Portal.RDS.UserControls
{
public const string DirectionString = "DirectionString";
+ public bool ButtonAddEnabled
+ {
+ get
+ {
+ return btnAdd.Enabled;
+ }
+ set
+ {
+ btnAdd.Enabled = value;
+ }
+ }
+
protected enum SelectedState
{
All,
@@ -74,14 +86,7 @@ namespace WebsitePanel.Portal.RDS.UserControls
}";
Page.ClientScript.RegisterClientScriptBlock(typeof(RDSCollectionUsers), "SelectAllCheckboxes",
script, true);
- }
-
- PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
- if (cntx.Quotas.ContainsKey(Quotas.RDS_USERS))
- {
- int rdsUsersCount = ES.Services.RDS.GetOrganizationRdsUsersCount(PanelRequest.ItemID);
- btnAdd.Enabled = (!(cntx.Quotas[Quotas.RDS_USERS].QuotaAllocatedValue <= rdsUsersCount) || (cntx.Quotas[Quotas.RDS_USERS].QuotaAllocatedValue == -1));
- }
+ }
}
protected void btnAdd_Click(object sender, EventArgs e)
@@ -132,6 +137,19 @@ namespace WebsitePanel.Portal.RDS.UserControls
protected void BindPopupAccounts()
{
OrganizationUser[] accounts = ES.Services.Organizations.GetOrganizationUsersPaged(PanelRequest.ItemID, null, null, null, 0, Int32.MaxValue).PageUsers;
+ var localAdmins = ES.Services.RDS.GetRdsCollectionLocalAdmins(PanelRequest.CollectionID);
+
+ foreach (var user in accounts)
+ {
+ if (localAdmins.Select(l => l.AccountName).Contains(user.AccountName))
+ {
+ user.IsVIP = true;
+ }
+ else
+ {
+ user.IsVIP = false;
+ }
+ }
accounts = accounts.Where(x => !GetUsers().Select(p => p.AccountName).Contains(x.AccountName)).ToArray();
Array.Sort(accounts, CompareAccount);
@@ -221,7 +239,8 @@ namespace WebsitePanel.Portal.RDS.UserControls
{
AccountName = (string)gvPopupAccounts.DataKeys[i][0],
DisplayName = ((Literal)row.FindControl("litDisplayName")).Text,
- SamAccountName = ((HiddenField)row.FindControl("hdnSamName")).Value
+ SamAccountName = ((HiddenField)row.FindControl("hdnSamName")).Value,
+ IsVIP = Convert.ToBoolean(((HiddenField)row.FindControl("hdnLocalAdmin")).Value)
});
}
}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDSServers.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDSServers.ascx
index c38baf43..61130777 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDSServers.ascx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDSServers.ascx
@@ -15,10 +15,8 @@
-
-
-