add functionallity allow default default security groups
This commit is contained in:
parent
eaa655cf4e
commit
5d273cee9e
18 changed files with 546 additions and 115 deletions
|
@ -92,28 +92,42 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
string server = GetServerName();
|
||||
string securityGroupPath = AddADPrefix(securityGroup);
|
||||
|
||||
//Create mail enabled organization security group
|
||||
EnableMailSecurityDistributionGroup(runSpace, securityGroup, organizationId);
|
||||
transaction.RegisterMailEnabledDistributionGroup(securityGroup);
|
||||
UpdateSecurityDistributionGroup(runSpace, securityGroup, organizationId, IsConsumer);
|
||||
bool enableDefaultGroup = !string.IsNullOrEmpty(securityGroup);
|
||||
|
||||
if (enableDefaultGroup)
|
||||
{
|
||||
//Create mail enabled organization security group
|
||||
EnableMailSecurityDistributionGroup(runSpace, securityGroup, organizationId);
|
||||
transaction.RegisterMailEnabledDistributionGroup(securityGroup);
|
||||
UpdateSecurityDistributionGroup(runSpace, securityGroup, organizationId, IsConsumer);
|
||||
}
|
||||
|
||||
//create GAL
|
||||
string galId = CreateGlobalAddressList(runSpace, organizationId);
|
||||
transaction.RegisterNewGlobalAddressList(galId);
|
||||
ExchangeLog.LogInfo(" Global Address List: {0}", galId);
|
||||
UpdateGlobalAddressList(runSpace, galId, securityGroupPath);
|
||||
if (enableDefaultGroup)
|
||||
{
|
||||
UpdateGlobalAddressList(runSpace, galId, securityGroupPath);
|
||||
}
|
||||
|
||||
//create AL
|
||||
string alId = CreateAddressList(runSpace, organizationId);
|
||||
transaction.RegisterNewAddressList(alId);
|
||||
ExchangeLog.LogInfo(" Address List: {0}", alId);
|
||||
UpdateAddressList(runSpace, alId, securityGroupPath);
|
||||
if (enableDefaultGroup)
|
||||
{
|
||||
UpdateAddressList(runSpace, alId, securityGroupPath);
|
||||
}
|
||||
|
||||
//create RAL
|
||||
string ralId = CreateRoomsAddressList(runSpace, organizationId);
|
||||
transaction.RegisterNewRoomsAddressList(ralId);
|
||||
ExchangeLog.LogInfo(" Rooms Address List: {0}", ralId);
|
||||
UpdateAddressList(runSpace, ralId, securityGroupPath);
|
||||
if (enableDefaultGroup)
|
||||
{
|
||||
UpdateAddressList(runSpace, ralId, securityGroupPath);
|
||||
}
|
||||
|
||||
//create ActiveSync policy
|
||||
string asId = CreateActiveSyncPolicy(runSpace, organizationId);
|
||||
|
@ -283,7 +297,12 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
//disable mail security distribution group
|
||||
try
|
||||
{
|
||||
DisableMailSecurityDistributionGroup(runSpace, securityGroup);
|
||||
bool enableDefaultGroup = !string.IsNullOrEmpty(securityGroup);
|
||||
|
||||
if (enableDefaultGroup)
|
||||
{
|
||||
DisableMailSecurityDistributionGroup(runSpace, securityGroup);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue