Merge
This commit is contained in:
commit
77b2ca42e3
6 changed files with 26 additions and 26 deletions
|
@ -5457,6 +5457,13 @@ CREATE TABLE RDSServers
|
|||
)
|
||||
GO
|
||||
|
||||
IF NOT EXISTS(SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'RDSServers' AND COLUMN_NAME = 'ConnectionEnabled')
|
||||
BEGIN
|
||||
ALTER TABLE [dbo].[RDSServers]
|
||||
ADD ConnectionEnabled BIT NOT NULL DEFAULT(1)
|
||||
END
|
||||
GO
|
||||
|
||||
|
||||
IF NOT EXISTS (SELECT * FROM SYS.TABLES WHERE name = 'RDSCollections')
|
||||
CREATE TABLE RDSCollections
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
<Reference Include="Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\Lib\Microsoft.Web.Services3.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.configuration" />
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<configuration>
|
||||
<appSettings>
|
||||
<add key="ES.WebService" value="http://localhost:9002"/>
|
||||
<!-- Username and password for access to WebsitePanel. For example "serveradmin" -->
|
||||
<add key="ES.Username" value="serveradmin"/>
|
||||
<add key="ES.Password" value="serveradmin"/>
|
||||
<add key="LogFile" value="WebsitePanel.FixDefaultPublicFolderMailbox.log"/>
|
||||
|
|
|
@ -5537,7 +5537,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
res += id + " has a value \"" + defaultPublicFoldes[0] + "\"" + Environment.NewLine;
|
||||
|
||||
if (defaultPublicFoldes.Length == 2)
|
||||
res += id + " changed from \"" + defaultPublicFoldes[0] + "\" to \"" + defaultPublicFoldes[1] + "\"" + Environment.NewLine;
|
||||
res += id + " changed \"" + defaultPublicFoldes[0] + "\" to \"" + defaultPublicFoldes[1] + "\"" + Environment.NewLine;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -5334,16 +5334,13 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
|
||||
string newValue = orgCanonicalName + "/" + GetPublicFolderMailboxName(organizationId);
|
||||
|
||||
if (newValue != oldValue)
|
||||
{
|
||||
cmd = new Command("Set-Mailbox");
|
||||
cmd.Parameters.Add("Identity", id);
|
||||
cmd.Parameters.Add("DefaultPublicFolderMailbox", newValue);
|
||||
cmd = new Command("Set-Mailbox");
|
||||
cmd.Parameters.Add("Identity", id);
|
||||
cmd.Parameters.Add("DefaultPublicFolderMailbox", newValue);
|
||||
|
||||
ExecuteShellCommand(runSpace, cmd);
|
||||
ExecuteShellCommand(runSpace, cmd);
|
||||
|
||||
res.Add(newValue);
|
||||
}
|
||||
res.Add(newValue);
|
||||
|
||||
}
|
||||
finally
|
||||
|
|
|
@ -988,34 +988,28 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
|
|||
{
|
||||
var usersGroupName = GetUsersGroupName(collectionName);
|
||||
var usersGroupPath = GetUsersGroupPath(organizationId, collectionName);
|
||||
var orgPath = GetOrganizationPath(organizationId);
|
||||
var orgEntry = ActiveDirectoryUtils.GetADObject(orgPath);
|
||||
var groupUsers = ActiveDirectoryUtils.GetGroupObjects(usersGroupName, "user", orgEntry);
|
||||
|
||||
//remove all users from group
|
||||
foreach (string userPath in ActiveDirectoryUtils.GetGroupObjects(usersGroupName, "user"))
|
||||
foreach (string userPath in groupUsers)
|
||||
{
|
||||
ActiveDirectoryUtils.RemoveObjectFromGroup(userPath, usersGroupPath);
|
||||
}
|
||||
ActiveDirectoryUtils.RemoveObjectFromGroup(userPath, usersGroupPath);
|
||||
}
|
||||
|
||||
//adding users to group
|
||||
foreach (var user in users)
|
||||
{
|
||||
var userPath = GetUserPath(organizationId, user);
|
||||
Log.WriteWarning(string.Format("User Path: {0}", userPath));
|
||||
Log.WriteWarning(string.Format("Group Name: {0}", usersGroupName));
|
||||
var userPath = GetUserPath(organizationId, user);
|
||||
|
||||
if (ActiveDirectoryUtils.AdObjectExists(userPath))
|
||||
{
|
||||
var userObject = ActiveDirectoryUtils.GetADObject(userPath);
|
||||
var samName = (string)ActiveDirectoryUtils.GetADObjectProperty(userObject, "sAMAccountName");
|
||||
Log.WriteWarning(string.Format("SAMAccountName: {0}", samName));
|
||||
|
||||
if (!ActiveDirectoryUtils.IsUserInGroup(samName, usersGroupName))
|
||||
{
|
||||
Log.WriteWarning(string.Format("{0} not exists in {1}", samName, usersGroupName));
|
||||
var userGroupsPath = GetUsersGroupPath(organizationId, collectionName);
|
||||
ActiveDirectoryUtils.AddObjectToGroup(userPath, userGroupsPath);
|
||||
Log.WriteWarning(string.Format("{0} added", samName));
|
||||
}
|
||||
}
|
||||
var samName = (string)ActiveDirectoryUtils.GetADObjectProperty(userObject, "sAMAccountName");
|
||||
var userGroupsPath = GetUsersGroupPath(organizationId, collectionName);
|
||||
ActiveDirectoryUtils.AddObjectToGroup(userPath, userGroupsPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue