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 4e792004..41bdec12 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSEditApplicationUsers.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSEditApplicationUsers.ascx.cs @@ -50,7 +50,8 @@ namespace WebsitePanel.Portal.RDS litCollectionName.Text = collection.Name; txtApplicationName.Text = remoteApp.DisplayName; - var remoteAppUsers = organizationUsers.Where(x => applicationUsers.Contains(x.AccountName)); + //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())); users.SetUsers(remoteAppUsers.ToArray()); } @@ -64,7 +65,8 @@ namespace WebsitePanel.Portal.RDS var applications = ES.Services.RDS.GetCollectionRemoteApplications(PanelRequest.ItemID, collection.Name); var remoteApp = applications.Where(x => x.Alias.Equals(PanelRequest.ApplicationID, StringComparison.CurrentCultureIgnoreCase)).FirstOrDefault(); remoteApp.DisplayName = txtApplicationName.Text; - ES.Services.RDS.SetApplicationUsers(PanelRequest.ItemID, PanelRequest.CollectionID, remoteApp, users.GetUsers().Select(x => x.AccountName).ToArray()); + //ES.Services.RDS.SetApplicationUsers(PanelRequest.ItemID, PanelRequest.CollectionID, remoteApp, users.GetUsers().Select(x => x.AccountName).ToArray()); + ES.Services.RDS.SetApplicationUsers(PanelRequest.ItemID, PanelRequest.CollectionID, remoteApp, users.GetUsers().Select(x => x.SamAccountName.Split('\\').Last()).ToArray()); } catch (Exception ex) {