diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/RemoteDesktopServices/RemoteDesktopServicesController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/RemoteDesktopServices/RemoteDesktopServicesController.cs index 8d31d923..b9e2884f 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/RemoteDesktopServices/RemoteDesktopServicesController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/RemoteDesktopServices/RemoteDesktopServicesController.cs @@ -1055,15 +1055,15 @@ namespace WebsitePanel.EnterpriseServer var usersInDb = GetRdsCollectionUsers(collectionId); - var usersAccountNames = users.Select(x => x.AccountName).ToList(); + var accountNames = users.Select(x => x.AccountName).ToList(); //Set on server - rds.SetUsersInCollection(org.OrganizationId, collection.Name, users.Select(x => x.AccountName).ToArray()); + rds.SetUsersInCollection(org.OrganizationId, collection.Name, users.Select(x => x.SamAccountName).ToArray()); //Remove from db foreach (var userInDb in usersInDb) { - if (!usersAccountNames.Contains(userInDb.AccountName)) + if (!accountNames.Contains(userInDb.AccountName)) { DataProvider.RemoveRDSUserFromRDSCollection(collectionId, userInDb.AccountId); } @@ -1109,9 +1109,9 @@ namespace WebsitePanel.EnterpriseServer } var rds = GetRemoteDesktopServices(GetRemoteDesktopServiceID(org.PackageId)); - var collection = GetRdsCollection(collectionId); - - result.AddRange(rds.GetApplicationUsers(collection.Name, remoteApp.Alias)); + var collection = ObjectUtils.FillObjectFromDataReader(DataProvider.GetRDSCollectionById(collectionId)); + var users = rds.GetApplicationUsers(collection.Name, remoteApp.Alias); + result.AddRange(users); return result; } diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Web.config.orig b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Web.config.orig deleted file mode 100644 index 9b0b5c9c..00000000 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Web.config.orig +++ /dev/null @@ -1,63 +0,0 @@ - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.TerminalServices.Windows2012/Windows2012.cs b/WebsitePanel/Sources/WebsitePanel.Providers.TerminalServices.Windows2012/Windows2012.cs index 2a0bd0c7..2c892a1a 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.TerminalServices.Windows2012/Windows2012.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.TerminalServices.Windows2012/Windows2012.cs @@ -986,13 +986,11 @@ namespace WebsitePanel.Providers.RemoteDesktopServices //adding users to group foreach (var user in users) { - var userPath = GetUserPath(organizationId, user); + var samName = user.Split('\\').Last(); + var userPath = GetUserPath(organizationId, samName); if (ActiveDirectoryUtils.AdObjectExists(userPath)) - { - var userObject = ActiveDirectoryUtils.GetADObject(userPath); - var samName = (string)ActiveDirectoryUtils.GetADObjectProperty(userObject, "sAMAccountName"); - + { if (!ActiveDirectoryUtils.IsUserInGroup(samName, usersGroupName)) { ActiveDirectoryUtils.AddObjectToGroup(userPath, GetUsersGroupPath(organizationId, collectionName)); 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 6190b880..eaa2d42f 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,7 @@ namespace WebsitePanel.Portal.RDS litCollectionName.Text = collection.Name; txtApplicationName.Text = remoteApp.DisplayName; - var remoteAppUsers = organizationUsers.Where(x => applicationUsers.Contains(x.DomainUserName)); + var remoteAppUsers = organizationUsers.Where(x => applicationUsers.Select(a => a.Split('\\').Last().ToLower()).Contains(x.SamAccountName.Split('\\').Last().ToLower())); users.SetUsers(remoteAppUsers.ToArray()); } @@ -64,7 +64,7 @@ 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.SamAccountName.Split('\\').Last()).ToArray()); } catch (Exception ex) { 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 8f2bbf36..4ba1e5c0 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/RDSCollectionUsers.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/RDSCollectionUsers.ascx @@ -25,6 +25,7 @@ + @@ -79,6 +80,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 1ba8cefc..fdd2e6ce 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 @@ -194,6 +194,7 @@ namespace WebsitePanel.Portal.RDS.UserControls OrganizationUser user = new OrganizationUser(); user.AccountName = (string)gvUsers.DataKeys[i][0]; user.DisplayName = ((Literal)row.FindControl("litAccount")).Text; + user.SamAccountName = ((HiddenField)row.FindControl("hdnSamAccountName")).Value; if (state == SelectedState.All || (state == SelectedState.Selected && chkSelect.Checked) || @@ -219,7 +220,8 @@ namespace WebsitePanel.Portal.RDS.UserControls accounts.Add(new OrganizationUser { AccountName = (string)gvPopupAccounts.DataKeys[i][0], - DisplayName = ((Literal)row.FindControl("litDisplayName")).Text + DisplayName = ((Literal)row.FindControl("litDisplayName")).Text, + SamAccountName = ((HiddenField)row.FindControl("hdnSamName")).Value }); } } diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/Web.config.orig b/WebsitePanel/Sources/WebsitePanel.WebPortal/Web.config.orig deleted file mode 100644 index 20d32caf..00000000 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/Web.config.orig +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/WebsitePanel/build.xml b/WebsitePanel/build.xml index cf20fd3a..886973e5 100644 --- a/WebsitePanel/build.xml +++ b/WebsitePanel/build.xml @@ -37,8 +37,9 @@ $(TrunkFolder)\Sources\Tools\WebsitePanel.Import.Enterprise\bin\$(BuildConfiguration) $(TrunkFolder)\Sources\Tools\WebsitePanel.AWStats.Viewer $(TrunkFolder)\Sources\Tools\WSPTransportAgent + $(TrunkFolder)\Sources\Tools\WebsitePanel.FixDefaultPublicFolderMailbox\bin\$(BuildConfiguration) - $(BuildFolder)\Server + $(BuildFolder)\Server $(BuildFolder)\EnterpriseServer $(BuildFolder)\SchedulerService $(BuildFolder)\Portal @@ -51,8 +52,9 @@ $(BuildFolder)\WSPTransportAgent $(BuildFolder)\LocalizationToolkit $(BuildFolder)\Installer + $(BuildFolder)\FixDefaultPublicFolderMailbox - + @@ -61,7 +63,8 @@ - + + @@ -92,7 +95,8 @@ - + + @@ -110,8 +114,9 @@ + - + @@ -125,7 +130,8 @@ - + + @@ -345,8 +351,17 @@ - - + + + + + + + + + + + @@ -368,8 +383,9 @@ $(ToolsFolder)\Import.Enterprise $(ToolsFolder)\AWStats.Viewer $(ToolsFolder)\WSPTransportAgent - - + $(ToolsFolder)\FixDefaultPublicFolderMailbox + + @@ -492,9 +508,20 @@ - + - + + + + + + + + + + + + $(DeployFolder)\Update $(UpdateFolder)\Server @@ -502,7 +529,7 @@ $(UpdateFolder)\Portal - + @@ -697,6 +724,7 @@ + @@ -786,12 +814,13 @@ - + - + +