diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/RemoteDesktopServices/RemoteDesktopServicesController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/RemoteDesktopServices/RemoteDesktopServicesController.cs index 7c75150a..975d49c1 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/RemoteDesktopServices/RemoteDesktopServicesController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/RemoteDesktopServices/RemoteDesktopServicesController.cs @@ -1596,7 +1596,14 @@ namespace WebsitePanel.EnterpriseServer var rds = RemoteDesktopServicesHelpers.GetRemoteDesktopServices(RemoteDesktopServicesHelpers.GetRemoteDesktopServiceID(org.PackageId)); var collection = ObjectUtils.FillObjectFromDataReader(DataProvider.GetRDSCollectionById(collectionId)); - var users = rds.GetApplicationUsers(collection.Name, remoteApp.Alias); + string alias = ""; + + if (remoteApp != null) + { + alias = remoteApp.Alias; + } + + var users = rds.GetApplicationUsers(collection.Name, alias); result.AddRange(users); return result; diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.TerminalServices.Windows2012/Windows2012.cs b/WebsitePanel/Sources/WebsitePanel.Providers.TerminalServices.Windows2012/Windows2012.cs index 058ccb32..62f3db25 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.TerminalServices.Windows2012/Windows2012.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.TerminalServices.Windows2012/Windows2012.cs @@ -709,7 +709,11 @@ namespace WebsitePanel.Providers.RemoteDesktopServices Command cmd = new Command("Get-RDRemoteApp"); cmd.Parameters.Add("CollectionName", collectionName); cmd.Parameters.Add("ConnectionBroker", ConnectionBroker); - cmd.Parameters.Add("Alias", applicationName); + + if (!string.IsNullOrEmpty(applicationName)) + { + cmd.Parameters.Add("Alias", applicationName); + } var application = ExecuteShellCommand(runspace, cmd, false).FirstOrDefault(); diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSEditCollectionUsers.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSEditCollectionUsers.ascx index 57a37195..02015403 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSEditCollectionUsers.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSEditCollectionUsers.ascx @@ -10,42 +10,40 @@ -
-
-
-
-
-
-
- - - - - -
-
- - - - - - - -
- -
-
-
- -     - +
+
+
+
+
+
+
+ + + - + +
+
+ + + + + +
+ +
+
+
+ +     + +
+
+ +
+
-
- -
-
-
-
-
-
\ No newline at end of file +
+
+
\ No newline at end of file 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 906a2160..efcc68cb 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSEditCollectionUsers.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSEditCollectionUsers.ascx.cs @@ -26,7 +26,9 @@ // (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.Linq; using System.Web.UI.WebControls; using WebsitePanel.EnterpriseServer; @@ -41,31 +43,16 @@ namespace WebsitePanel.Portal.RDS protected void Page_Load(object sender, EventArgs e) { - users.Module = Module; + users.Module = Module; + users.OnRefreshClicked -= OnRefreshClicked; + users.OnRefreshClicked += OnRefreshClicked; if (!IsPostBack) { 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); + users.BindUsers(); } - } + } private void BindQuota() { @@ -87,6 +74,11 @@ namespace WebsitePanel.Portal.RDS } } + private void OnRefreshClicked(object sender, EventArgs e) + { + ((ModalPopupExtender)asyncTasks.FindControl("ModalPopupProperties")).Hide(); + } + private bool SaveRdsUsers() { try diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/App_LocalResources/RDSCollectionUsers.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/App_LocalResources/RDSCollectionUsers.ascx.resx index 47a2f1e3..1686c266 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/App_LocalResources/RDSCollectionUsers.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/App_LocalResources/RDSCollectionUsers.ascx.resx @@ -126,6 +126,9 @@ Cancel + + Cancel + Delete @@ -153,4 +156,10 @@ Enabled Users + + Warning + + + Unable to remove the following user(s) since they are local admins<br/>or they were granted access to remote applications + \ No newline at end of file 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 1572c47a..138d7f28 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/RDSCollectionUsers.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/RDSCollectionUsers.ascx @@ -5,7 +5,7 @@
- +
+ +