mergecommit

This commit is contained in:
robvde 2013-09-10 15:17:13 +04:00
commit aed1199470
81 changed files with 2467 additions and 1113 deletions

View file

@ -1,35 +1,7 @@
// Copyright (c) 2012, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
// Runtime Version:4.0.30319.18033 // Runtime Version:4.0.30319.18051
// //
// Changes to this file may cause incorrect behavior and will be lost if // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.

View file

@ -310,7 +310,7 @@ function websitepanel_ChangePassword($params)
else else
{ {
// Attempt to change the user's account password // Attempt to change the user's account password
$result = $wsp->change_user_password($user['UserId'], $password); $result = $wsp->changeUserPassword($user['UserId'], $password);
if ($result >= 0) if ($result >= 0)
{ {
// Log this action for logging / tracking purposes incase the client complains we have record of what went on and why // Log this action for logging / tracking purposes incase the client complains we have record of what went on and why

View file

@ -1964,7 +1964,145 @@ WHERE
RETURN RETURN
GO GO
-- Lync Phone Numbers Quota
IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE ([QuotaName] = N'Lync.PhoneNumbers'))
BEGIN
INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID], [HideQuota]) VALUES (381, 41, 12, N'Lync.PhoneNumbers', N'Phone Numbers', 2, 0, NULL, NULL)
END
GO
ALTER FUNCTION [dbo].[CalculateQuotaUsage]
(
@PackageID int,
@QuotaID int
)
RETURNS int
AS
BEGIN
DECLARE @QuotaTypeID int
SELECT @QuotaTypeID = QuotaTypeID FROM Quotas
WHERE QuotaID = @QuotaID
IF @QuotaTypeID <> 2
RETURN 0
DECLARE @Result int
IF @QuotaID = 52 -- diskspace
SET @Result = dbo.CalculatePackageDiskspace(@PackageID)
ELSE IF @QuotaID = 51 -- bandwidth
SET @Result = dbo.CalculatePackageBandwidth(@PackageID)
ELSE IF @QuotaID = 53 -- domains
SET @Result = (SELECT COUNT(D.DomainID) FROM PackagesTreeCache AS PT
INNER JOIN Domains AS D ON D.PackageID = PT.PackageID
WHERE IsSubDomain = 0 AND IsInstantAlias = 0 AND IsDomainPointer = 0 AND PT.ParentPackageID = @PackageID)
ELSE IF @QuotaID = 54 -- sub-domains
SET @Result = (SELECT COUNT(D.DomainID) FROM PackagesTreeCache AS PT
INNER JOIN Domains AS D ON D.PackageID = PT.PackageID
WHERE IsSubDomain = 1 AND IsInstantAlias = 0 AND IsDomainPointer = 0 AND PT.ParentPackageID = @PackageID)
ELSE IF @QuotaID = 220 -- domain pointers
SET @Result = (SELECT COUNT(D.DomainID) FROM PackagesTreeCache AS PT
INNER JOIN Domains AS D ON D.PackageID = PT.PackageID
WHERE IsDomainPointer = 1 AND PT.ParentPackageID = @PackageID)
ELSE IF @QuotaID = 71 -- scheduled tasks
SET @Result = (SELECT COUNT(S.ScheduleID) FROM PackagesTreeCache AS PT
INNER JOIN Schedule AS S ON S.PackageID = PT.PackageID
WHERE PT.ParentPackageID = @PackageID)
ELSE IF @QuotaID = 305 -- RAM of VPS
SET @Result = (SELECT SUM(CAST(SIP.PropertyValue AS int)) FROM ServiceItemProperties AS SIP
INNER JOIN ServiceItems AS SI ON SIP.ItemID = SI.ItemID
INNER JOIN PackagesTreeCache AS PT ON SI.PackageID = PT.PackageID
WHERE SIP.PropertyName = 'RamSize' AND PT.ParentPackageID = @PackageID)
ELSE IF @QuotaID = 306 -- HDD of VPS
SET @Result = (SELECT SUM(CAST(SIP.PropertyValue AS int)) FROM ServiceItemProperties AS SIP
INNER JOIN ServiceItems AS SI ON SIP.ItemID = SI.ItemID
INNER JOIN PackagesTreeCache AS PT ON SI.PackageID = PT.PackageID
WHERE SIP.PropertyName = 'HddSize' AND PT.ParentPackageID = @PackageID)
ELSE IF @QuotaID = 309 -- External IP addresses of VPS
SET @Result = (SELECT COUNT(PIP.PackageAddressID) FROM PackageIPAddresses AS PIP
INNER JOIN IPAddresses AS IP ON PIP.AddressID = IP.AddressID
INNER JOIN PackagesTreeCache AS PT ON PIP.PackageID = PT.PackageID
WHERE PT.ParentPackageID = @PackageID AND IP.PoolID = 3)
ELSE IF @QuotaID = 100 -- Dedicated Web IP addresses
SET @Result = (SELECT COUNT(PIP.PackageAddressID) FROM PackageIPAddresses AS PIP
INNER JOIN IPAddresses AS IP ON PIP.AddressID = IP.AddressID
INNER JOIN PackagesTreeCache AS PT ON PIP.PackageID = PT.PackageID
WHERE PT.ParentPackageID = @PackageID AND IP.PoolID = 2)
ELSE IF @QuotaID = 350 -- RAM of VPSforPc
SET @Result = (SELECT SUM(CAST(SIP.PropertyValue AS int)) FROM ServiceItemProperties AS SIP
INNER JOIN ServiceItems AS SI ON SIP.ItemID = SI.ItemID
INNER JOIN PackagesTreeCache AS PT ON SI.PackageID = PT.PackageID
WHERE SIP.PropertyName = 'Memory' AND PT.ParentPackageID = @PackageID)
ELSE IF @QuotaID = 351 -- HDD of VPSforPc
SET @Result = (SELECT SUM(CAST(SIP.PropertyValue AS int)) FROM ServiceItemProperties AS SIP
INNER JOIN ServiceItems AS SI ON SIP.ItemID = SI.ItemID
INNER JOIN PackagesTreeCache AS PT ON SI.PackageID = PT.PackageID
WHERE SIP.PropertyName = 'HddSize' AND PT.ParentPackageID = @PackageID)
ELSE IF @QuotaID = 354 -- External IP addresses of VPSforPc
SET @Result = (SELECT COUNT(PIP.PackageAddressID) FROM PackageIPAddresses AS PIP
INNER JOIN IPAddresses AS IP ON PIP.AddressID = IP.AddressID
INNER JOIN PackagesTreeCache AS PT ON PIP.PackageID = PT.PackageID
WHERE PT.ParentPackageID = @PackageID AND IP.PoolID = 3)
ELSE IF @QuotaID = 319 -- BB Users
SET @Result = (SELECT COUNT(ea.AccountID) FROM ExchangeAccounts ea
INNER JOIN BlackBerryUsers bu ON ea.AccountID = bu.AccountID
INNER JOIN ServiceItems si ON ea.ItemID = si.ItemID
INNER JOIN PackagesTreeCache pt ON si.PackageID = pt.PackageID
WHERE pt.ParentPackageID = @PackageID)
ELSE IF @QuotaID = 320 -- OCS Users
SET @Result = (SELECT COUNT(ea.AccountID) FROM ExchangeAccounts ea
INNER JOIN OCSUsers ocs ON ea.AccountID = ocs.AccountID
INNER JOIN ServiceItems si ON ea.ItemID = si.ItemID
INNER JOIN PackagesTreeCache pt ON si.PackageID = pt.PackageID
WHERE pt.ParentPackageID = @PackageID)
ELSE IF @QuotaID = 206 -- HostedSolution.Users
SET @Result = (SELECT COUNT(ea.AccountID) FROM ExchangeAccounts AS ea
INNER JOIN ServiceItems si ON ea.ItemID = si.ItemID
INNER JOIN PackagesTreeCache pt ON si.PackageID = pt.PackageID
WHERE pt.ParentPackageID = @PackageID AND ea.AccountType IN (1,5,6,7))
ELSE IF @QuotaID = 78 -- Exchange2007.Mailboxes
SET @Result = (SELECT COUNT(ea.AccountID) FROM ExchangeAccounts AS ea
INNER JOIN ServiceItems si ON ea.ItemID = si.ItemID
INNER JOIN PackagesTreeCache pt ON si.PackageID = pt.PackageID
WHERE pt.ParentPackageID = @PackageID
AND ea.AccountType IN (1)
AND ea.MailboxPlanId IS NOT NULL)
ELSE IF @QuotaID = 77 -- Exchange2007.DiskSpace
SET @Result = (SELECT SUM(B.MailboxSizeMB) FROM ExchangeAccounts AS ea
INNER JOIN ExchangeMailboxPlans AS B ON ea.MailboxPlanId = B.MailboxPlanId
INNER JOIN ServiceItems si ON ea.ItemID = si.ItemID
INNER JOIN PackagesTreeCache pt ON si.PackageID = pt.PackageID
WHERE pt.ParentPackageID = @PackageID)
ELSE IF @QuotaID = 370 -- Lync.Users
SET @Result = (SELECT COUNT(ea.AccountID) FROM ExchangeAccounts AS ea
INNER JOIN LyncUsers lu ON ea.AccountID = lu.AccountID
INNER JOIN ServiceItems si ON ea.ItemID = si.ItemID
INNER JOIN PackagesTreeCache pt ON si.PackageID = pt.PackageID
WHERE pt.ParentPackageID = @PackageID)
ELSE IF @QuotaID = 376 -- Lync.EVUsers
SET @Result = (SELECT COUNT(ea.AccountID) FROM ExchangeAccounts AS ea
INNER JOIN LyncUsers lu ON ea.AccountID = lu.AccountID
INNER JOIN LyncUserPlans lp ON lu.LyncUserPlanId = lp.LyncUserPlanId
INNER JOIN ServiceItems si ON ea.ItemID = si.ItemID
INNER JOIN PackagesTreeCache pt ON si.PackageID = pt.PackageID
WHERE pt.ParentPackageID = @PackageID AND lp.EnterpriseVoice = 1)
ELSE IF @QuotaID = 381 -- Dedicated Lync Phone Numbers
SET @Result = (SELECT COUNT(PIP.PackageAddressID) FROM PackageIPAddresses AS PIP
INNER JOIN IPAddresses AS IP ON PIP.AddressID = IP.AddressID
INNER JOIN PackagesTreeCache AS PT ON PIP.PackageID = PT.PackageID
WHERE PT.ParentPackageID = @PackageID AND IP.PoolID = 5)
ELSE
SET @Result = (SELECT COUNT(SI.ItemID) FROM Quotas AS Q
INNER JOIN ServiceItems AS SI ON SI.ItemTypeID = Q.ItemTypeID
INNER JOIN PackagesTreeCache AS PT ON SI.PackageID = PT.PackageID AND PT.ParentPackageID = @PackageID
WHERE Q.QuotaID = @QuotaID)
RETURN @Result
END
GO
-- Enterprise Storage Provider -- Enterprise Storage Provider
IF NOT EXISTS (SELECT * FROM [dbo].[ResourceGroups] WHERE [GroupName] = 'EnterpriseStorage') IF NOT EXISTS (SELECT * FROM [dbo].[ResourceGroups] WHERE [GroupName] = 'EnterpriseStorage')
@ -2006,6 +2144,7 @@ ALTER PROCEDURE [dbo].[SearchExchangeAccounts]
@IncludeDistributionLists bit, @IncludeDistributionLists bit,
@IncludeRooms bit, @IncludeRooms bit,
@IncludeEquipment bit, @IncludeEquipment bit,
@IncludeSecurityGroups bit,
@FilterColumn nvarchar(50) = '', @FilterColumn nvarchar(50) = '',
@FilterValue nvarchar(50) = '', @FilterValue nvarchar(50) = '',
@SortColumn nvarchar(50) @SortColumn nvarchar(50)
@ -2027,7 +2166,7 @@ OR (@IncludeContacts = 1 AND EA.AccountType = 2)
OR (@IncludeDistributionLists = 1 AND EA.AccountType = 3) OR (@IncludeDistributionLists = 1 AND EA.AccountType = 3)
OR (@IncludeRooms = 1 AND EA.AccountType = 5) OR (@IncludeRooms = 1 AND EA.AccountType = 5)
OR (@IncludeEquipment = 1 AND EA.AccountType = 6) OR (@IncludeEquipment = 1 AND EA.AccountType = 6)
OR (@IncludeEquipment = 0 AND @IncludeContacts = 0 AND @IncludeDistributionLists = 0 AND @IncludeRooms = 0 AND @IncludeEquipment = 0 AND EA.AccountType = 8)) OR (@IncludeSecurityGroups = 1 AND EA.AccountType = 8))
AND EA.ItemID = @ItemID AND EA.ItemID = @ItemID
' '
@ -2057,8 +2196,77 @@ WHERE ' + @condition
print @sql print @sql
exec sp_executesql @sql, N'@ItemID int, @IncludeMailboxes int, @IncludeContacts int, exec sp_executesql @sql, N'@ItemID int, @IncludeMailboxes int, @IncludeContacts int,
@IncludeDistributionLists int, @IncludeRooms bit, @IncludeEquipment bit', @IncludeDistributionLists int, @IncludeRooms bit, @IncludeEquipment bit, @IncludeSecurityGroups bit',
@ItemID, @IncludeMailboxes, @IncludeContacts, @IncludeDistributionLists, @IncludeRooms, @IncludeEquipment @ItemID, @IncludeMailboxes, @IncludeContacts, @IncludeDistributionLists, @IncludeRooms, @IncludeEquipment, @IncludeSecurityGroups
RETURN
GO
IF EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'SearchExchangeAccountsByTypes')
DROP PROCEDURE [dbo].[SearchExchangeAccountsByTypes]
GO
CREATE PROCEDURE [dbo].[SearchExchangeAccountsByTypes]
(
@ActorID int,
@ItemID int,
@AccountTypes nvarchar(30),
@FilterColumn nvarchar(50) = '',
@FilterValue nvarchar(50) = '',
@SortColumn nvarchar(50)
)
AS
DECLARE @PackageID int
SELECT @PackageID = PackageID FROM ServiceItems
WHERE ItemID = @ItemID
-- check rights
IF dbo.CheckActorPackageRights(@ActorID, @PackageID) = 0
RAISERROR('You are not allowed to access this package', 16, 1)
DECLARE @condition nvarchar(700)
SET @condition = 'EA.ItemID = @ItemID AND EA.AccountType IN (' + @AccountTypes + ')'
IF @FilterColumn <> '' AND @FilterColumn IS NOT NULL
AND @FilterValue <> '' AND @FilterValue IS NOT NULL
BEGIN
IF @FilterColumn = 'PrimaryEmailAddress' AND @AccountTypes <> '2'
BEGIN
SET @condition = @condition + ' AND EA.AccountID IN (SELECT EAEA.AccountID FROM ExchangeAccountEmailAddresses EAEA WHERE EAEA.EmailAddress LIKE ''' + @FilterValue + ''')'
END
ELSE
BEGIN
SET @condition = @condition + ' AND ' + @FilterColumn + ' LIKE ''' + @FilterValue + ''''
END
END
IF @SortColumn IS NULL OR @SortColumn = ''
SET @SortColumn = 'EA.DisplayName ASC'
DECLARE @sql nvarchar(3500)
SET @sql = '
SELECT
EA.AccountID,
EA.ItemID,
EA.AccountType,
EA.AccountName,
EA.DisplayName,
EA.PrimaryEmailAddress,
EA.MailEnabledPublicFolder,
EA.MailboxPlanId,
P.MailboxPlan,
EA.SubscriberNumber,
EA.UserPrincipalName
FROM
ExchangeAccounts AS EA
LEFT OUTER JOIN ExchangeMailboxPlans AS P ON EA.MailboxPlanId = P.MailboxPlanId
WHERE ' + @condition
+ ' ORDER BY ' + @SortColumn
EXEC sp_executesql @sql, N'@ItemID int', @ItemID
RETURN RETURN
GO GO

View file

@ -1,35 +1,7 @@
// Copyright (c) 2012, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
// Runtime Version:4.0.30319.18033 // Runtime Version:4.0.30319.18051
// //
// Changes to this file may cause incorrect behavior and will be lost if // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.

View file

@ -1,7 +1,7 @@
'------------------------------------------------------------------------------ '------------------------------------------------------------------------------
' <auto-generated> ' <auto-generated>
' This code was generated by a tool. ' This code was generated by a tool.
' Runtime Version:4.0.30319.18033 ' Runtime Version:4.0.30319.18051
' '
' Changes to this file may cause incorrect behavior and will be lost if ' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated. ' the code is regenerated.

View file

@ -230,6 +230,7 @@ order by rg.groupOrder
public const string LYNC_EVMOBILE = "Lync.EVMobile"; public const string LYNC_EVMOBILE = "Lync.EVMobile";
public const string LYNC_EVINTERNATIONAL = "Lync.EVInternational"; public const string LYNC_EVINTERNATIONAL = "Lync.EVInternational";
public const string LYNC_ENABLEDPLANSEDITING = "Lync.EnablePlansEditing"; public const string LYNC_ENABLEDPLANSEDITING = "Lync.EnablePlansEditing";
public const string LYNC_PHONE = "Lync.PhoneNumbers";
public const string HELICON_ZOO = "HeliconZoo.*"; public const string HELICON_ZOO = "HeliconZoo.*";

View file

@ -3053,7 +3053,7 @@ namespace WebsitePanel.EnterpriseServer
/// <remarks/> /// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SearchAccounts", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SearchAccounts", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public ExchangeAccount[] SearchAccounts(int itemId, bool includeMailboxes, bool includeContacts, bool includeDistributionLists, bool includeRooms, bool includeEquipment, string filterColumn, string filterValue, string sortColumn) public ExchangeAccount[] SearchAccounts(int itemId, bool includeMailboxes, bool includeContacts, bool includeDistributionLists, bool includeRooms, bool includeEquipment, bool includeSecurityGroups, string filterColumn, string filterValue, string sortColumn)
{ {
object[] results = this.Invoke("SearchAccounts", new object[] { object[] results = this.Invoke("SearchAccounts", new object[] {
itemId, itemId,
@ -3062,6 +3062,7 @@ namespace WebsitePanel.EnterpriseServer
includeDistributionLists, includeDistributionLists,
includeRooms, includeRooms,
includeEquipment, includeEquipment,
includeSecurityGroups,
filterColumn, filterColumn,
filterValue, filterValue,
sortColumn}); sortColumn});
@ -3069,7 +3070,7 @@ namespace WebsitePanel.EnterpriseServer
} }
/// <remarks/> /// <remarks/>
public System.IAsyncResult BeginSearchAccounts(int itemId, bool includeMailboxes, bool includeContacts, bool includeDistributionLists, bool includeRooms, bool includeEquipment, string filterColumn, string filterValue, string sortColumn, System.AsyncCallback callback, object asyncState) public System.IAsyncResult BeginSearchAccounts(int itemId, bool includeMailboxes, bool includeContacts, bool includeDistributionLists, bool includeRooms, bool includeEquipment, bool includeSecurityGroups, string filterColumn, string filterValue, string sortColumn, System.AsyncCallback callback, object asyncState)
{ {
return this.BeginInvoke("SearchAccounts", new object[] { return this.BeginInvoke("SearchAccounts", new object[] {
itemId, itemId,
@ -3078,6 +3079,7 @@ namespace WebsitePanel.EnterpriseServer
includeDistributionLists, includeDistributionLists,
includeRooms, includeRooms,
includeEquipment, includeEquipment,
includeSecurityGroups,
filterColumn, filterColumn,
filterValue, filterValue,
sortColumn}, callback, asyncState); sortColumn}, callback, asyncState);
@ -3091,13 +3093,13 @@ namespace WebsitePanel.EnterpriseServer
} }
/// <remarks/> /// <remarks/>
public void SearchAccountsAsync(int itemId, bool includeMailboxes, bool includeContacts, bool includeDistributionLists, bool includeRooms, bool includeEquipment, string filterColumn, string filterValue, string sortColumn) public void SearchAccountsAsync(int itemId, bool includeMailboxes, bool includeContacts, bool includeDistributionLists, bool includeRooms, bool includeEquipment, bool includeSecurityGroups, string filterColumn, string filterValue, string sortColumn)
{ {
this.SearchAccountsAsync(itemId, includeMailboxes, includeContacts, includeDistributionLists, includeRooms, includeEquipment, filterColumn, filterValue, sortColumn, null); this.SearchAccountsAsync(itemId, includeMailboxes, includeContacts, includeDistributionLists, includeRooms, includeEquipment, includeSecurityGroups, filterColumn, filterValue, sortColumn, null);
} }
/// <remarks/> /// <remarks/>
public void SearchAccountsAsync(int itemId, bool includeMailboxes, bool includeContacts, bool includeDistributionLists, bool includeRooms, bool includeEquipment, string filterColumn, string filterValue, string sortColumn, object userState) public void SearchAccountsAsync(int itemId, bool includeMailboxes, bool includeContacts, bool includeDistributionLists, bool includeRooms, bool includeEquipment, bool includeSecurityGroups, string filterColumn, string filterValue, string sortColumn, object userState)
{ {
if ((this.SearchAccountsOperationCompleted == null)) if ((this.SearchAccountsOperationCompleted == null))
{ {
@ -3110,6 +3112,7 @@ namespace WebsitePanel.EnterpriseServer
includeDistributionLists, includeDistributionLists,
includeRooms, includeRooms,
includeEquipment, includeEquipment,
includeSecurityGroups,
filterColumn, filterColumn,
filterValue, filterValue,
sortColumn}, this.SearchAccountsOperationCompleted, userState); sortColumn}, this.SearchAccountsOperationCompleted, userState);

View file

@ -127,13 +127,13 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution
private System.Threading.SendOrPostCallback GetOrganizationSecurityGroupsPagedOperationCompleted; private System.Threading.SendOrPostCallback GetOrganizationSecurityGroupsPagedOperationCompleted;
private System.Threading.SendOrPostCallback AddUserToSecurityGroupOperationCompleted; private System.Threading.SendOrPostCallback AddObjectToSecurityGroupOperationCompleted;
private System.Threading.SendOrPostCallback DeleteUserFromSecurityGroupOperationCompleted; private System.Threading.SendOrPostCallback DeleteObjectFromSecurityGroupOperationCompleted;
private System.Threading.SendOrPostCallback GetSecurityGroupsByMemberOperationCompleted; private System.Threading.SendOrPostCallback GetSecurityGroupsByMemberOperationCompleted;
private System.Threading.SendOrPostCallback SearchSecurityGroupsOperationCompleted; private System.Threading.SendOrPostCallback SearchOrganizationAccountsOperationCompleted;
/// <remarks/> /// <remarks/>
public esOrganizations() public esOrganizations()
@ -235,16 +235,16 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution
public event GetOrganizationSecurityGroupsPagedCompletedEventHandler GetOrganizationSecurityGroupsPagedCompleted; public event GetOrganizationSecurityGroupsPagedCompletedEventHandler GetOrganizationSecurityGroupsPagedCompleted;
/// <remarks/> /// <remarks/>
public event AddUserToSecurityGroupCompletedEventHandler AddUserToSecurityGroupCompleted; public event AddObjectToSecurityGroupCompletedEventHandler AddObjectToSecurityGroupCompleted;
/// <remarks/> /// <remarks/>
public event DeleteUserFromSecurityGroupCompletedEventHandler DeleteUserFromSecurityGroupCompleted; public event DeleteObjectFromSecurityGroupCompletedEventHandler DeleteObjectFromSecurityGroupCompleted;
/// <remarks/> /// <remarks/>
public event GetSecurityGroupsByMemberCompletedEventHandler GetSecurityGroupsByMemberCompleted; public event GetSecurityGroupsByMemberCompletedEventHandler GetSecurityGroupsByMemberCompleted;
/// <remarks/> /// <remarks/>
public event SearchSecurityGroupsCompletedEventHandler SearchSecurityGroupsCompleted; public event SearchOrganizationAccountsCompletedEventHandler SearchOrganizationAccountsCompleted;
/// <remarks/> /// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/CheckOrgIdExists", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/CheckOrgIdExists", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
@ -2166,112 +2166,112 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution
} }
/// <remarks/> /// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/AddUserToSecurityGroup", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/AddObjectToSecurityGroup", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public int AddUserToSecurityGroup(int itemId, int userAccountId, string groupName) public int AddObjectToSecurityGroup(int itemId, int accountId, string groupName)
{ {
object[] results = this.Invoke("AddUserToSecurityGroup", new object[] { object[] results = this.Invoke("AddObjectToSecurityGroup", new object[] {
itemId, itemId,
userAccountId, accountId,
groupName}); groupName});
return ((int)(results[0])); return ((int)(results[0]));
} }
/// <remarks/> /// <remarks/>
public System.IAsyncResult BeginAddUserToSecurityGroup(int itemId, int userAccountId, string groupName, System.AsyncCallback callback, object asyncState) public System.IAsyncResult BeginAddObjectToSecurityGroup(int itemId, int accountId, string groupName, System.AsyncCallback callback, object asyncState)
{ {
return this.BeginInvoke("AddUserToSecurityGroup", new object[] { return this.BeginInvoke("AddObjectToSecurityGroup", new object[] {
itemId, itemId,
userAccountId, accountId,
groupName}, callback, asyncState); groupName}, callback, asyncState);
} }
/// <remarks/> /// <remarks/>
public int EndAddUserToSecurityGroup(System.IAsyncResult asyncResult) public int EndAddObjectToSecurityGroup(System.IAsyncResult asyncResult)
{ {
object[] results = this.EndInvoke(asyncResult); object[] results = this.EndInvoke(asyncResult);
return ((int)(results[0])); return ((int)(results[0]));
} }
/// <remarks/> /// <remarks/>
public void AddUserToSecurityGroupAsync(int itemId, int userAccountId, string groupName) public void AddObjectToSecurityGroupAsync(int itemId, int accountId, string groupName)
{ {
this.AddUserToSecurityGroupAsync(itemId, userAccountId, groupName, null); this.AddObjectToSecurityGroupAsync(itemId, accountId, groupName, null);
} }
/// <remarks/> /// <remarks/>
public void AddUserToSecurityGroupAsync(int itemId, int userAccountId, string groupName, object userState) public void AddObjectToSecurityGroupAsync(int itemId, int accountId, string groupName, object userState)
{ {
if ((this.AddUserToSecurityGroupOperationCompleted == null)) if ((this.AddObjectToSecurityGroupOperationCompleted == null))
{ {
this.AddUserToSecurityGroupOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddUserToSecurityGroupOperationCompleted); this.AddObjectToSecurityGroupOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddObjectToSecurityGroupOperationCompleted);
} }
this.InvokeAsync("AddUserToSecurityGroup", new object[] { this.InvokeAsync("AddObjectToSecurityGroup", new object[] {
itemId, itemId,
userAccountId, accountId,
groupName}, this.AddUserToSecurityGroupOperationCompleted, userState); groupName}, this.AddObjectToSecurityGroupOperationCompleted, userState);
} }
private void OnAddUserToSecurityGroupOperationCompleted(object arg) private void OnAddObjectToSecurityGroupOperationCompleted(object arg)
{ {
if ((this.AddUserToSecurityGroupCompleted != null)) if ((this.AddObjectToSecurityGroupCompleted != null))
{ {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.AddUserToSecurityGroupCompleted(this, new AddUserToSecurityGroupCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); this.AddObjectToSecurityGroupCompleted(this, new AddObjectToSecurityGroupCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
} }
} }
/// <remarks/> /// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DeleteUserFromSecurityGroup", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DeleteObjectFromSecurityGroup", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public int DeleteUserFromSecurityGroup(int itemId, int userAccountId, string groupName) public int DeleteObjectFromSecurityGroup(int itemId, int accountId, string groupName)
{ {
object[] results = this.Invoke("DeleteUserFromSecurityGroup", new object[] { object[] results = this.Invoke("DeleteObjectFromSecurityGroup", new object[] {
itemId, itemId,
userAccountId, accountId,
groupName}); groupName});
return ((int)(results[0])); return ((int)(results[0]));
} }
/// <remarks/> /// <remarks/>
public System.IAsyncResult BeginDeleteUserFromSecurityGroup(int itemId, int userAccountId, string groupName, System.AsyncCallback callback, object asyncState) public System.IAsyncResult BeginDeleteObjectFromSecurityGroup(int itemId, int accountId, string groupName, System.AsyncCallback callback, object asyncState)
{ {
return this.BeginInvoke("DeleteUserFromSecurityGroup", new object[] { return this.BeginInvoke("DeleteObjectFromSecurityGroup", new object[] {
itemId, itemId,
userAccountId, accountId,
groupName}, callback, asyncState); groupName}, callback, asyncState);
} }
/// <remarks/> /// <remarks/>
public int EndDeleteUserFromSecurityGroup(System.IAsyncResult asyncResult) public int EndDeleteObjectFromSecurityGroup(System.IAsyncResult asyncResult)
{ {
object[] results = this.EndInvoke(asyncResult); object[] results = this.EndInvoke(asyncResult);
return ((int)(results[0])); return ((int)(results[0]));
} }
/// <remarks/> /// <remarks/>
public void DeleteUserFromSecurityGroupAsync(int itemId, int userAccountId, string groupName) public void DeleteObjectFromSecurityGroupAsync(int itemId, int accountId, string groupName)
{ {
this.DeleteUserFromSecurityGroupAsync(itemId, userAccountId, groupName, null); this.DeleteObjectFromSecurityGroupAsync(itemId, accountId, groupName, null);
} }
/// <remarks/> /// <remarks/>
public void DeleteUserFromSecurityGroupAsync(int itemId, int userAccountId, string groupName, object userState) public void DeleteObjectFromSecurityGroupAsync(int itemId, int accountId, string groupName, object userState)
{ {
if ((this.DeleteUserFromSecurityGroupOperationCompleted == null)) if ((this.DeleteObjectFromSecurityGroupOperationCompleted == null))
{ {
this.DeleteUserFromSecurityGroupOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteUserFromSecurityGroupOperationCompleted); this.DeleteObjectFromSecurityGroupOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteObjectFromSecurityGroupOperationCompleted);
} }
this.InvokeAsync("DeleteUserFromSecurityGroup", new object[] { this.InvokeAsync("DeleteObjectFromSecurityGroup", new object[] {
itemId, itemId,
userAccountId, accountId,
groupName}, this.DeleteUserFromSecurityGroupOperationCompleted, userState); groupName}, this.DeleteObjectFromSecurityGroupOperationCompleted, userState);
} }
private void OnDeleteUserFromSecurityGroupOperationCompleted(object arg) private void OnDeleteObjectFromSecurityGroupOperationCompleted(object arg)
{ {
if ((this.DeleteUserFromSecurityGroupCompleted != null)) if ((this.DeleteObjectFromSecurityGroupCompleted != null))
{ {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.DeleteUserFromSecurityGroupCompleted(this, new DeleteUserFromSecurityGroupCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); this.DeleteObjectFromSecurityGroupCompleted(this, new DeleteObjectFromSecurityGroupCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
} }
} }
@ -2328,60 +2328,63 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution
} }
/// <remarks/> /// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SearchSecurityGroups", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SearchOrganizationAccounts", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public ExchangeAccount[] SearchSecurityGroups(int itemId, string filterColumn, string filterValue, string sortColumn) public ExchangeAccount[] SearchOrganizationAccounts(int itemId, string filterColumn, string filterValue, string sortColumn, bool includeOnlySecurityGroups)
{ {
object[] results = this.Invoke("SearchSecurityGroups", new object[] { object[] results = this.Invoke("SearchOrganizationAccounts", new object[] {
itemId, itemId,
filterColumn, filterColumn,
filterValue, filterValue,
sortColumn}); sortColumn,
includeOnlySecurityGroups});
return ((ExchangeAccount[])(results[0])); return ((ExchangeAccount[])(results[0]));
} }
/// <remarks/> /// <remarks/>
public System.IAsyncResult BeginSearchSecurityGroups(int itemId, string filterColumn, string filterValue, string sortColumn, System.AsyncCallback callback, object asyncState) public System.IAsyncResult BeginSearchOrganizationAccounts(int itemId, string filterColumn, string filterValue, string sortColumn, bool includeOnlySecurityGroups, System.AsyncCallback callback, object asyncState)
{ {
return this.BeginInvoke("SearchSecurityGroups", new object[] { return this.BeginInvoke("SearchOrganizationAccounts", new object[] {
itemId, itemId,
filterColumn, filterColumn,
filterValue, filterValue,
sortColumn}, callback, asyncState); sortColumn,
includeOnlySecurityGroups}, callback, asyncState);
} }
/// <remarks/> /// <remarks/>
public ExchangeAccount[] EndSearchSecurityGroups(System.IAsyncResult asyncResult) public ExchangeAccount[] EndSearchOrganizationAccounts(System.IAsyncResult asyncResult)
{ {
object[] results = this.EndInvoke(asyncResult); object[] results = this.EndInvoke(asyncResult);
return ((ExchangeAccount[])(results[0])); return ((ExchangeAccount[])(results[0]));
} }
/// <remarks/> /// <remarks/>
public void SearchSecurityGroupsAsync(int itemId, string filterColumn, string filterValue, string sortColumn) public void SearchOrganizationAccountsAsync(int itemId, string filterColumn, string filterValue, string sortColumn, bool includeOnlySecurityGroups)
{ {
this.SearchSecurityGroupsAsync(itemId, filterColumn, filterValue, sortColumn, null); this.SearchOrganizationAccountsAsync(itemId, filterColumn, filterValue, sortColumn, includeOnlySecurityGroups, null);
} }
/// <remarks/> /// <remarks/>
public void SearchSecurityGroupsAsync(int itemId, string filterColumn, string filterValue, string sortColumn, object userState) public void SearchOrganizationAccountsAsync(int itemId, string filterColumn, string filterValue, string sortColumn, bool includeOnlySecurityGroups, object userState)
{ {
if ((this.SearchSecurityGroupsOperationCompleted == null)) if ((this.SearchOrganizationAccountsOperationCompleted == null))
{ {
this.SearchSecurityGroupsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSearchSecurityGroupsOperationCompleted); this.SearchOrganizationAccountsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSearchOrganizationAccountsOperationCompleted);
} }
this.InvokeAsync("SearchSecurityGroups", new object[] { this.InvokeAsync("SearchOrganizationAccounts", new object[] {
itemId, itemId,
filterColumn, filterColumn,
filterValue, filterValue,
sortColumn}, this.SearchSecurityGroupsOperationCompleted, userState); sortColumn,
includeOnlySecurityGroups}, this.SearchOrganizationAccountsOperationCompleted, userState);
} }
private void OnSearchSecurityGroupsOperationCompleted(object arg) private void OnSearchOrganizationAccountsOperationCompleted(object arg)
{ {
if ((this.SearchSecurityGroupsCompleted != null)) if ((this.SearchOrganizationAccountsCompleted != null))
{ {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.SearchSecurityGroupsCompleted(this, new SearchSecurityGroupsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); this.SearchOrganizationAccountsCompleted(this, new SearchOrganizationAccountsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
} }
} }
@ -3324,18 +3327,18 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void AddUserToSecurityGroupCompletedEventHandler(object sender, AddUserToSecurityGroupCompletedEventArgs e); public delegate void AddObjectToSecurityGroupCompletedEventHandler(object sender, AddObjectToSecurityGroupCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class AddUserToSecurityGroupCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs public partial class AddObjectToSecurityGroupCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
{ {
private object[] results; private object[] results;
internal AddUserToSecurityGroupCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : internal AddObjectToSecurityGroupCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) base(exception, cancelled, userState)
{ {
this.results = results; this.results = results;
@ -3354,18 +3357,18 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void DeleteUserFromSecurityGroupCompletedEventHandler(object sender, DeleteUserFromSecurityGroupCompletedEventArgs e); public delegate void DeleteObjectFromSecurityGroupCompletedEventHandler(object sender, DeleteObjectFromSecurityGroupCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class DeleteUserFromSecurityGroupCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs public partial class DeleteObjectFromSecurityGroupCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
{ {
private object[] results; private object[] results;
internal DeleteUserFromSecurityGroupCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : internal DeleteObjectFromSecurityGroupCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) base(exception, cancelled, userState)
{ {
this.results = results; this.results = results;
@ -3414,18 +3417,18 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void SearchSecurityGroupsCompletedEventHandler(object sender, SearchSecurityGroupsCompletedEventArgs e); public delegate void SearchOrganizationAccountsCompletedEventHandler(object sender, SearchOrganizationAccountsCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")] [System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class SearchSecurityGroupsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs public partial class SearchOrganizationAccountsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
{ {
private object[] results; private object[] results;
internal SearchSecurityGroupsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : internal SearchOrganizationAccountsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) base(exception, cancelled, userState)
{ {
this.results = results; this.results = results;

View file

@ -188,6 +188,22 @@ namespace WebsitePanel.EnterpriseServer
// get type properties // get type properties
PropertyInfo[] props = GetTypeProperties(type); PropertyInfo[] props = GetTypeProperties(type);
// leave only a property from the DataReader
DataTable readerSchema = reader.GetSchemaTable();
if (readerSchema != null)
{
List<PropertyInfo> propslist = new List<PropertyInfo>();
foreach (DataRow field in readerSchema.Rows)
{
string columnName = System.Convert.ToString(field["ColumnName"]);
foreach (PropertyInfo prop in props)
if (columnName.ToLower() == prop.Name.ToLower())
propslist.Add(prop);
}
props = propslist.ToArray();
}
// iterate through reader // iterate through reader
while (reader.Read()) while (reader.Read())
{ {

View file

@ -1952,7 +1952,7 @@ namespace WebsitePanel.EnterpriseServer
new SqlParameter("@finishDate", new SqlParameter("@finishDate",
finishDate == DateTime.MinValue finishDate == DateTime.MinValue
? DBNull.Value ? DBNull.Value
: (object) finishDate), : (object)finishDate),
new SqlParameter("@indicatorCurrent", indicatorCurrent), new SqlParameter("@indicatorCurrent", indicatorCurrent),
new SqlParameter("@indicatorMaximum", indicatorMaximum), new SqlParameter("@indicatorMaximum", indicatorMaximum),
new SqlParameter("@maximumExecutionTime", maximumExecutionTime), new SqlParameter("@maximumExecutionTime", maximumExecutionTime),
@ -2636,6 +2636,38 @@ namespace WebsitePanel.EnterpriseServer
); );
} }
public static IDataReader SearchExchangeAccountsByTypes(int actorId, int itemId, string accountTypes,
string filterColumn, string filterValue, string sortColumn)
{
// check input parameters
string[] types = accountTypes.Split(',');
for (int i = 0; i < types.Length; i++)
{
try
{
int type = Int32.Parse(types[i]);
}
catch
{
throw new ArgumentException("Wrong patameter", "accountTypes");
}
}
string searchTypes = String.Join(",", types);
return SqlHelper.ExecuteReader(
ConnectionString,
CommandType.StoredProcedure,
"SearchExchangeAccountsByTypes",
new SqlParameter("@ActorID", actorId),
new SqlParameter("@ItemID", itemId),
new SqlParameter("@AccountTypes", searchTypes),
new SqlParameter("@FilterColumn", VerifyColumnName(filterColumn)),
new SqlParameter("@FilterValue", VerifyColumnValue(filterValue)),
new SqlParameter("@SortColumn", VerifyColumnName(sortColumn))
);
}
public static DataSet GetExchangeAccountsPaged(int actorId, int itemId, string accountTypes, public static DataSet GetExchangeAccountsPaged(int actorId, int itemId, string accountTypes,
string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows)
{ {
@ -2672,7 +2704,7 @@ namespace WebsitePanel.EnterpriseServer
public static IDataReader SearchExchangeAccounts(int actorId, int itemId, bool includeMailboxes, public static IDataReader SearchExchangeAccounts(int actorId, int itemId, bool includeMailboxes,
bool includeContacts, bool includeDistributionLists, bool includeRooms, bool includeEquipment, bool includeContacts, bool includeDistributionLists, bool includeRooms, bool includeEquipment,
string filterColumn, string filterValue, string sortColumn) bool includeSecurityGroups, string filterColumn, string filterValue, string sortColumn)
{ {
return SqlHelper.ExecuteReader( return SqlHelper.ExecuteReader(
ConnectionString, ConnectionString,
@ -2685,6 +2717,7 @@ namespace WebsitePanel.EnterpriseServer
new SqlParameter("@IncludeDistributionLists", includeDistributionLists), new SqlParameter("@IncludeDistributionLists", includeDistributionLists),
new SqlParameter("@IncludeRooms", includeRooms), new SqlParameter("@IncludeRooms", includeRooms),
new SqlParameter("@IncludeEquipment", includeEquipment), new SqlParameter("@IncludeEquipment", includeEquipment),
new SqlParameter("@IncludeSecurityGroups", includeSecurityGroups),
new SqlParameter("@FilterColumn", VerifyColumnName(filterColumn)), new SqlParameter("@FilterColumn", VerifyColumnName(filterColumn)),
new SqlParameter("@FilterValue", VerifyColumnValue(filterValue)), new SqlParameter("@FilterValue", VerifyColumnValue(filterValue)),
new SqlParameter("@SortColumn", VerifyColumnName(sortColumn)) new SqlParameter("@SortColumn", VerifyColumnName(sortColumn))

View file

@ -999,7 +999,7 @@ namespace WebsitePanel.EnterpriseServer
else if (accountType == ExchangeAccountType.Contact) else if (accountType == ExchangeAccountType.Contact)
return SearchAccounts(0, false, true, false, false, false, "", "", ""); return SearchAccounts(0, false, true, false, false, false, "", "", "");
else if (accountType == ExchangeAccountType.DistributionList) else if (accountType == ExchangeAccountType.DistributionList)
return SearchAccounts(0, false, false, true, false, false, "", "", ""); return SearchAccounts(0, false, false, true, false, false, false, "", "", "");
else else
{ {
List<ExchangeAccount> demoAccounts = new List<ExchangeAccount>(); List<ExchangeAccount> demoAccounts = new List<ExchangeAccount>();
@ -1050,7 +1050,7 @@ namespace WebsitePanel.EnterpriseServer
public static List<ExchangeAccount> SearchAccounts(int itemId, public static List<ExchangeAccount> SearchAccounts(int itemId,
bool includeMailboxes, bool includeContacts, bool includeDistributionLists, bool includeMailboxes, bool includeContacts, bool includeDistributionLists,
bool includeRooms, bool includeEquipment, bool includeRooms, bool includeEquipment, bool includeSecurityGroups,
string filterColumn, string filterValue, string sortColumn) string filterColumn, string filterValue, string sortColumn)
{ {
#region Demo Mode #region Demo Mode
@ -1131,6 +1131,16 @@ namespace WebsitePanel.EnterpriseServer
demoAccounts.Add(d1); demoAccounts.Add(d1);
} }
if (includeSecurityGroups)
{
ExchangeAccount g1 = new ExchangeAccount();
g1.AccountId = 7;
g1.AccountName = "group_fabrikam";
g1.AccountType = ExchangeAccountType.SecurityGroup;
g1.DisplayName = "Fabrikam Sales Dept";
demoAccounts.Add(g1);
}
return demoAccounts; return demoAccounts;
} }
#endregion #endregion
@ -3444,7 +3454,7 @@ namespace WebsitePanel.EnterpriseServer
ExchangeDistributionList dl = exchange.GetDistributionListGeneralSettings(accountName); ExchangeDistributionList dl = exchange.GetDistributionListGeneralSettings(accountName);
// add meta-item // add meta-item
int accountId = AddAccount(itemId, ExchangeAccountType.DistributionList, email, int accountId = AddAccount(itemId, ExchangeAccountType.DistributionList, accountName,
displayName, email, false, displayName, email, false,
0, dl.SAMAccountName, null, 0, null); 0, dl.SAMAccountName, null, 0, null);
@ -4039,7 +4049,8 @@ namespace WebsitePanel.EnterpriseServer
List<ExchangeAccount> DistributionLists = GetAccounts(itemId, ExchangeAccountType.DistributionList); List<ExchangeAccount> DistributionLists = GetAccounts(itemId, ExchangeAccountType.DistributionList);
foreach (ExchangeAccount DistributionAccount in DistributionLists) foreach (ExchangeAccount DistributionAccount in DistributionLists)
{ {
ExchangeDistributionList DistributionList = exchange.GetDistributionListGeneralSettings(DistributionAccount.AccountName); //ExchangeDistributionList DistributionList = exchange.GetDistributionListGeneralSettings(DistributionAccount.AccountName);
OrganizationSecurityGroup DistributionList = OrganizationController.GetSecurityGroupGeneralSettings(itemId, DistributionAccount.AccountId);
foreach (ExchangeAccount member in DistributionList.MembersAccounts) foreach (ExchangeAccount member in DistributionList.MembersAccounts)
{ {

View file

@ -60,7 +60,7 @@ namespace WebsitePanel.EnterpriseServer
OrganizationStatistics stats = GetOrganizationStatistics(orgId); OrganizationStatistics stats = GetOrganizationStatistics(orgId);
if (stats.AllocatedUsers != -1 && (stats.CreatedUsers >= stats.AllocatedUsers) ) if (stats.AllocatedUsers != -1 && (stats.CreatedUsers >= stats.AllocatedUsers))
{ {
errorCode = BusinessErrorCodes.ERROR_USERS_RESOURCE_QUOTA_LIMIT; errorCode = BusinessErrorCodes.ERROR_USERS_RESOURCE_QUOTA_LIMIT;
return false; return false;
@ -165,7 +165,7 @@ namespace WebsitePanel.EnterpriseServer
if (errorCode < 0) return false; if (errorCode < 0) return false;
// check organizations quota // check organizations quota
QuotaValueInfo quota = PackageController.GetPackageQuota(packageId, Quotas.ORGANIZATIONS ); QuotaValueInfo quota = PackageController.GetPackageQuota(packageId, Quotas.ORGANIZATIONS);
if (quota.QuotaExhausted) if (quota.QuotaExhausted)
{ {
errorCode = BusinessErrorCodes.ERROR_ORGS_RESOURCE_QUOTA_LIMIT; errorCode = BusinessErrorCodes.ERROR_ORGS_RESOURCE_QUOTA_LIMIT;
@ -191,7 +191,7 @@ namespace WebsitePanel.EnterpriseServer
StringDictionary serviceSettings = ServerController.GetServiceSettings(serviceId); StringDictionary serviceSettings = ServerController.GetServiceSettings(serviceId);
string tempDomain = serviceSettings[TemporyDomainName]; string tempDomain = serviceSettings[TemporyDomainName];
return String.IsNullOrEmpty(tempDomain) ? null : organizationId + "."+ tempDomain; return String.IsNullOrEmpty(tempDomain) ? null : organizationId + "." + tempDomain;
} }
private static DomainInfo CreateNewDomain(int packageId, string domainName) private static DomainInfo CreateNewDomain(int packageId, string domainName)
@ -490,7 +490,7 @@ namespace WebsitePanel.EnterpriseServer
if (!delUserResult.IsSuccess) if (!delUserResult.IsSuccess)
{ {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
foreach(string str in delUserResult.ErrorCodes) foreach (string str in delUserResult.ErrorCodes)
{ {
sb.Append(str); sb.Append(str);
sb.Append('\n'); sb.Append('\n');
@ -499,7 +499,7 @@ namespace WebsitePanel.EnterpriseServer
throw new ApplicationException(sb.ToString()); throw new ApplicationException(sb.ToString());
} }
} }
catch(Exception ex) catch (Exception ex)
{ {
successful = false; successful = false;
TaskManager.WriteError(ex); TaskManager.WriteError(ex);
@ -509,7 +509,7 @@ namespace WebsitePanel.EnterpriseServer
else else
{ {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
foreach(string str in res.ErrorCodes) foreach (string str in res.ErrorCodes)
{ {
sb.Append(str); sb.Append(str);
sb.Append('\n'); sb.Append('\n');
@ -518,7 +518,7 @@ namespace WebsitePanel.EnterpriseServer
throw new ApplicationException(sb.ToString()); throw new ApplicationException(sb.ToString());
} }
} }
catch(Exception ex) catch (Exception ex)
{ {
successful = false; successful = false;
TaskManager.WriteError(ex); TaskManager.WriteError(ex);
@ -639,7 +639,7 @@ namespace WebsitePanel.EnterpriseServer
if (!delUserResult.IsSuccess) if (!delUserResult.IsSuccess)
{ {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
foreach(string str in delUserResult.ErrorCodes) foreach (string str in delUserResult.ErrorCodes)
{ {
sb.Append(str); sb.Append(str);
sb.Append('\n'); sb.Append('\n');
@ -648,7 +648,7 @@ namespace WebsitePanel.EnterpriseServer
throw new ApplicationException(sb.ToString()); throw new ApplicationException(sb.ToString());
} }
} }
catch(Exception ex) catch (Exception ex)
{ {
successful = false; successful = false;
TaskManager.WriteError(ex); TaskManager.WriteError(ex);
@ -658,7 +658,7 @@ namespace WebsitePanel.EnterpriseServer
else else
{ {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
foreach(string str in res.ErrorCodes) foreach (string str in res.ErrorCodes)
{ {
sb.Append(str); sb.Append(str);
sb.Append('\n'); sb.Append('\n');
@ -667,7 +667,7 @@ namespace WebsitePanel.EnterpriseServer
throw new ApplicationException(sb.ToString()); throw new ApplicationException(sb.ToString());
} }
} }
catch(Exception ex) catch (Exception ex)
{ {
successful = false; successful = false;
TaskManager.WriteError(ex); TaskManager.WriteError(ex);
@ -1035,7 +1035,7 @@ namespace WebsitePanel.EnterpriseServer
// change accepted domain type in DB // change accepted domain type in DB
int domainTypeId= (int) newDomainType; int domainTypeId = (int)newDomainType;
DataProvider.ChangeExchangeAcceptedDomainType(itemId, domainId, domainTypeId); DataProvider.ChangeExchangeAcceptedDomainType(itemId, domainId, domainTypeId);
return checkResult; return checkResult;
@ -1509,7 +1509,7 @@ namespace WebsitePanel.EnterpriseServer
/// <returns> The account name with organization Id. </returns> /// <returns> The account name with organization Id. </returns>
private static string BuildAccountNameWithOrgId(string orgId, string name, int serviceId) private static string BuildAccountNameWithOrgId(string orgId, string name, int serviceId)
{ {
name = name.Length > 5 ? name.Substring(0, 5) : name; name = ((orgId.Length + name.Length) > 19 && name.Length > 9) ? name.Substring(0, (19 - orgId.Length) < 10 ? 10 : 19 - orgId.Length) : name;
orgId = (orgId.Length + name.Length) > 19 ? orgId.Substring(0, 19 - name.Length) : orgId; orgId = (orgId.Length + name.Length) > 19 ? orgId.Substring(0, 19 - name.Length) : orgId;
@ -1583,7 +1583,7 @@ namespace WebsitePanel.EnterpriseServer
try try
{ {
Guid crmUserId = CRMController.GetCrmUserId( accountId); Guid crmUserId = CRMController.GetCrmUserId(accountId);
if (crmUserId != Guid.Empty) if (crmUserId != Guid.Empty)
{ {
return BusinessErrorCodes.CURRENT_USER_IS_CRM_USER; return BusinessErrorCodes.CURRENT_USER_IS_CRM_USER;
@ -1697,7 +1697,7 @@ namespace WebsitePanel.EnterpriseServer
// load account // load account
account = GetAccount(itemId, accountId); account = GetAccount(itemId, accountId);
} }
catch (Exception){} catch (Exception) { }
try try
{ {
@ -1766,7 +1766,7 @@ namespace WebsitePanel.EnterpriseServer
// get mailbox settings // get mailbox settings
Organizations orgProxy = GetOrganizationProxy(org.ServiceId); Organizations orgProxy = GetOrganizationProxy(org.ServiceId);
// external email // external email
string externalEmailAddress = (account.AccountType == ExchangeAccountType.User ) ? externalEmail : account.PrimaryEmailAddress; string externalEmailAddress = (account.AccountType == ExchangeAccountType.User) ? externalEmail : account.PrimaryEmailAddress;
orgProxy.SetUserGeneralSettings( orgProxy.SetUserGeneralSettings(
org.OrganizationId, org.OrganizationId,
@ -1951,7 +1951,7 @@ namespace WebsitePanel.EnterpriseServer
Organizations orgProxy = GetOrganizationProxy(org.ServiceId); Organizations orgProxy = GetOrganizationProxy(org.ServiceId);
orgProxy.SetUserPassword( org.OrganizationId, orgProxy.SetUserPassword(org.OrganizationId,
accountName, accountName,
password); password);
@ -1989,7 +1989,7 @@ namespace WebsitePanel.EnterpriseServer
public static List<OrganizationUser> SearchAccounts(int itemId, public static List<OrganizationUser> SearchAccounts(int itemId,
string filterColumn, string filterValue, string sortColumn, bool includeMailboxes ) string filterColumn, string filterValue, string sortColumn, bool includeMailboxes)
{ {
#region Demo Mode #region Demo Mode
if (IsDemoMode) if (IsDemoMode)
@ -2034,6 +2034,10 @@ namespace WebsitePanel.EnterpriseServer
DataProvider.SearchOrganizationAccounts(SecurityContext.User.UserId, itemId, DataProvider.SearchOrganizationAccounts(SecurityContext.User.UserId, itemId,
filterColumn, filterValue, sortColumn, includeMailboxes)); filterColumn, filterValue, sortColumn, includeMailboxes));
return Tmpaccounts;
// on large lists is very slow
/*
List<OrganizationUser> Accounts = new List<OrganizationUser>(); List<OrganizationUser> Accounts = new List<OrganizationUser>();
foreach (OrganizationUser user in Tmpaccounts.ToArray()) foreach (OrganizationUser user in Tmpaccounts.ToArray())
@ -2042,6 +2046,7 @@ namespace WebsitePanel.EnterpriseServer
} }
return Accounts; return Accounts;
*/
} }
public static int GetAccountIdByUserPrincipalName(int itemId, string userPrincipalName) public static int GetAccountIdByUserPrincipalName(int itemId, string userPrincipalName)
@ -2153,7 +2158,7 @@ namespace WebsitePanel.EnterpriseServer
public static PasswordPolicyResult GetPasswordPolicy(int itemId) public static PasswordPolicyResult GetPasswordPolicy(int itemId)
{ {
PasswordPolicyResult res = new PasswordPolicyResult {IsSuccess = true}; PasswordPolicyResult res = new PasswordPolicyResult { IsSuccess = true };
try try
{ {
Organization org = GetOrganization(itemId); Organization org = GetOrganization(itemId);
@ -2169,7 +2174,7 @@ namespace WebsitePanel.EnterpriseServer
{ {
orgProxy = GetOrganizationProxy(org.ServiceId); orgProxy = GetOrganizationProxy(org.ServiceId);
} }
catch(Exception ex) catch (Exception ex)
{ {
res.IsSuccess = false; res.IsSuccess = false;
res.ErrorCodes.Add(ErrorCodes.CANNOT_GET_ORGANIZATION_PROXY); res.ErrorCodes.Add(ErrorCodes.CANNOT_GET_ORGANIZATION_PROXY);
@ -2187,7 +2192,7 @@ namespace WebsitePanel.EnterpriseServer
res.Value = policyRes.Value; res.Value = policyRes.Value;
} }
catch(Exception ex) catch (Exception ex)
{ {
TaskManager.WriteError(ex); TaskManager.WriteError(ex);
res.IsSuccess = false; res.IsSuccess = false;
@ -2263,7 +2268,7 @@ namespace WebsitePanel.EnterpriseServer
Organizations orgProxy = GetOrganizationProxy(org.ServiceId); Organizations orgProxy = GetOrganizationProxy(org.ServiceId);
string groupName = BuildAccountNameWithOrgId(org.OrganizationId, displayName, org.ServiceId); string groupName = BuildAccountNameWithOrgId(org.OrganizationId, displayName.Replace(" ", ""), org.ServiceId);
TaskManager.Write("accountName :" + groupName); TaskManager.Write("accountName :" + groupName);
@ -2332,9 +2337,9 @@ namespace WebsitePanel.EnterpriseServer
securityGroup.IsDefault = account.AccountType == ExchangeAccountType.DefaultSecurityGroup; securityGroup.IsDefault = account.AccountType == ExchangeAccountType.DefaultSecurityGroup;
List<OrganizationUser> members = new List<OrganizationUser>(); List<ExchangeAccount> members = new List<ExchangeAccount>();
foreach (OrganizationUser user in securityGroup.MembersAccounts) foreach (ExchangeAccount user in securityGroup.MembersAccounts)
{ {
OrganizationUser userAccount = GetAccountByAccountName(itemId, user.SamAccountName); OrganizationUser userAccount = GetAccountByAccountName(itemId, user.SamAccountName);
@ -2342,6 +2347,7 @@ namespace WebsitePanel.EnterpriseServer
{ {
user.AccountId = userAccount.AccountId; user.AccountId = userAccount.AccountId;
user.AccountName = userAccount.AccountName; user.AccountName = userAccount.AccountName;
user.DisplayName = userAccount.DisplayName;
user.PrimaryEmailAddress = userAccount.PrimaryEmailAddress; user.PrimaryEmailAddress = userAccount.PrimaryEmailAddress;
user.AccountType = userAccount.AccountType; user.AccountType = userAccount.AccountType;
@ -2513,7 +2519,7 @@ namespace WebsitePanel.EnterpriseServer
return result; return result;
} }
public static int AddUserToSecurityGroup(int itemId, int userAccountId, string groupName) public static int AddObjectToSecurityGroup(int itemId, int accountId, string groupName)
{ {
// check account // check account
int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive);
@ -2530,11 +2536,11 @@ namespace WebsitePanel.EnterpriseServer
return -1; return -1;
// load user account // load user account
OrganizationUser userAccount = GetAccount(itemId, userAccountId); ExchangeAccount account = ExchangeServerController.GetAccount(itemId, accountId);
Organizations orgProxy = GetOrganizationProxy(org.ServiceId); Organizations orgProxy = GetOrganizationProxy(org.ServiceId);
orgProxy.AddUserToSecurityGroup(org.OrganizationId, userAccount.AccountName, groupName); orgProxy.AddObjectToSecurityGroup(org.OrganizationId, account.AccountName, groupName);
return 0; return 0;
} }
@ -2548,7 +2554,7 @@ namespace WebsitePanel.EnterpriseServer
} }
} }
public static int DeleteUserFromSecurityGroup(int itemId, int userAccountId, string groupName) public static int DeleteObjectFromSecurityGroup(int itemId, int accountId, string groupName)
{ {
// check account // check account
int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive);
@ -2565,11 +2571,11 @@ namespace WebsitePanel.EnterpriseServer
return -1; return -1;
// load user account // load user account
OrganizationUser userAccount = GetAccount(itemId, userAccountId); ExchangeAccount account = ExchangeServerController.GetAccount(itemId, accountId);
Organizations orgProxy = GetOrganizationProxy(org.ServiceId); Organizations orgProxy = GetOrganizationProxy(org.ServiceId);
orgProxy.DeleteUserFromSecurityGroup(org.OrganizationId, userAccount.AccountName, groupName); orgProxy.DeleteObjectFromSecurityGroup(org.OrganizationId, account.AccountName, groupName);
return 0; return 0;
} }
@ -2610,16 +2616,20 @@ namespace WebsitePanel.EnterpriseServer
// load account // load account
ExchangeAccount account = ExchangeServerController.GetAccount(itemId, accountId); ExchangeAccount account = ExchangeServerController.GetAccount(itemId, accountId);
List<ExchangeAccount> SecurytyGroups = ExchangeServerController.GetAccounts(itemId, ExchangeAccountType.SecurityGroup); List<ExchangeAccount> securytyGroups = ExchangeServerController.GetAccounts(itemId, ExchangeAccountType.SecurityGroup);
foreach (ExchangeAccount SecurytyGroupAccount in SecurytyGroups)
{
OrganizationSecurityGroup SecurytyGroup = GetSecurityGroupGeneralSettings(itemId, SecurytyGroupAccount.AccountId);
foreach (OrganizationUser member in SecurytyGroup.MembersAccounts) //load default group
securytyGroups.AddRange(ExchangeServerController.GetAccounts(itemId, ExchangeAccountType.DefaultSecurityGroup));
foreach (ExchangeAccount securityGroupAccount in securytyGroups)
{
OrganizationSecurityGroup securityGroup = GetSecurityGroupGeneralSettings(itemId, securityGroupAccount.AccountId);
foreach (ExchangeAccount member in securityGroup.MembersAccounts)
{ {
if (member.AccountName == account.AccountName) if (member.AccountName == account.AccountName)
{ {
ret.Add(SecurytyGroupAccount); ret.Add(securityGroupAccount);
break; break;
} }
@ -2638,39 +2648,96 @@ namespace WebsitePanel.EnterpriseServer
} }
} }
public static List<ExchangeAccount> SearchSecurityGroups(int itemId, string filterColumn, string filterValue, string sortColumn) public static List<ExchangeAccount> SearchOrganizationAccounts(int itemId, string filterColumn, string filterValue,
string sortColumn, bool includeOnlySecurityGroups)
{ {
#region Demo Mode #region Demo Mode
if (IsDemoMode) if (IsDemoMode)
{ {
List<ExchangeAccount> demoSecurityGroups = new List<ExchangeAccount>(); List<ExchangeAccount> demoAccounts = new List<ExchangeAccount>();
ExchangeAccount m1 = new ExchangeAccount();
m1.AccountId = 1;
m1.AccountName = "john_fabrikam";
m1.AccountType = ExchangeAccountType.Mailbox;
m1.DisplayName = "John Smith";
m1.PrimaryEmailAddress = "john@fabrikam.net";
demoAccounts.Add(m1);
ExchangeAccount m2 = new ExchangeAccount();
m2.AccountId = 2;
m2.AccountName = "jack_fabrikam";
m2.AccountType = ExchangeAccountType.User;
m2.DisplayName = "Jack Brown";
m2.PrimaryEmailAddress = "jack@fabrikam.net";
demoAccounts.Add(m2);
ExchangeAccount m3 = new ExchangeAccount();
m3.AccountId = 3;
m3.AccountName = "marry_fabrikam";
m3.AccountType = ExchangeAccountType.Mailbox;
m3.DisplayName = "Marry Smith";
m3.PrimaryEmailAddress = "marry@fabrikam.net";
demoAccounts.Add(m3);
ExchangeAccount r1 = new ExchangeAccount(); ExchangeAccount r1 = new ExchangeAccount();
r1.AccountId = 20; r1.AccountId = 20;
r1.AccountName = "group1_fabrikam"; r1.AccountName = "group1_fabrikam";
r1.AccountType = ExchangeAccountType.SecurityGroup; r1.AccountType = ExchangeAccountType.SecurityGroup;
r1.DisplayName = "Group 1"; r1.DisplayName = "Group 1";
demoSecurityGroups.Add(r1); demoAccounts.Add(r1);
ExchangeAccount r2 = new ExchangeAccount(); ExchangeAccount r2 = new ExchangeAccount();
r1.AccountId = 21; r1.AccountId = 21;
r1.AccountName = "group2_fabrikam"; r1.AccountName = "group2_fabrikam";
r1.AccountType = ExchangeAccountType.SecurityGroup; r1.AccountType = ExchangeAccountType.SecurityGroup;
r1.DisplayName = "Group 2"; r1.DisplayName = "Group 2";
demoSecurityGroups.Add(r2); demoAccounts.Add(r2);
return demoSecurityGroups; return demoAccounts;
} }
#endregion #endregion
List<ExchangeAccount> accounts = ObjectUtils.CreateListFromDataReader<ExchangeAccount>( string accountTypes = string.Format("{0}", ((int)ExchangeAccountType.SecurityGroup));
DataProvider.SearchExchangeAccounts(
SecurityContext.User.UserId, itemId, false, false, false, false, false, filterColumn, filterValue, sortColumn));
return accounts.Where(x => x.AccountType == ExchangeAccountType.SecurityGroup).ToList(); if (!includeOnlySecurityGroups)
{
accountTypes = string.Format("{0}, {1}, {2}, {3}, {4}, {5}", accountTypes, ((int)ExchangeAccountType.User), ((int)ExchangeAccountType.Mailbox),
((int)ExchangeAccountType.Room), ((int)ExchangeAccountType.Equipment), ((int)ExchangeAccountType.DistributionList));
}
List<ExchangeAccount> tmpAccounts = ObjectUtils.CreateListFromDataReader<ExchangeAccount>(
DataProvider.SearchExchangeAccountsByTypes(SecurityContext.User.UserId, itemId,
accountTypes, filterColumn, filterValue, sortColumn));
List<ExchangeAccount> accounts = new List<ExchangeAccount>();
foreach (ExchangeAccount tmpAccount in tmpAccounts.ToArray())
{
bool bSuccess = false;
switch (tmpAccount.AccountType)
{
case ExchangeAccountType.SecurityGroup:
bSuccess = GetSecurityGroupGeneralSettings(itemId, tmpAccount.AccountId) != null;
break;
case ExchangeAccountType.DistributionList:
bSuccess = ExchangeServerController.GetDistributionListGeneralSettings(itemId, tmpAccount.AccountId) != null;
break;
default:
bSuccess = GetUserGeneralSettings(itemId, tmpAccount.AccountId) != null;
break;
}
if (bSuccess)
{
accounts.Add(tmpAccount);
} }
} }
return accounts;
}
}
} }

View file

@ -1231,7 +1231,7 @@ namespace WebsitePanel.EnterpriseServer
} }
// check quotas // check quotas
string quotaName = GetIPAddressesQuotaByResourceGroup(groupName); string quotaName = GetIPAddressesQuotaByResourceGroup(groupName, pool);
// get maximum server IPs // get maximum server IPs
List<IPAddressInfo> ips = ServerController.GetUnallottedIPAddresses(packageId, groupName, pool); List<IPAddressInfo> ips = ServerController.GetUnallottedIPAddresses(packageId, groupName, pool);
@ -1249,15 +1249,15 @@ namespace WebsitePanel.EnterpriseServer
int quotaUsed = cntx.Quotas[quotaName].QuotaUsedValue; int quotaUsed = cntx.Quotas[quotaName].QuotaUsedValue;
// check the maximum allowed number // check the maximum allowed number
if (quotaAllocated != -1 && if (addressesNumber > (quotaAllocated - quotaUsed))
(addressesNumber > (quotaAllocated - quotaUsed)))
{ {
res.ErrorCodes.Add("IP_ADDRESSES_QUOTA_LIMIT_REACHED"); res.ErrorCodes.Add("IP_ADDRESSES_QUOTA_LIMIT_REACHED");
return res; return res;
} }
// check if requested more than available // check if requested more than available
if (addressesNumber > maxAvailableIPs) if (maxAvailableIPs != -1 &&
(addressesNumber > maxAvailableIPs))
addressesNumber = maxAvailableIPs; addressesNumber = maxAvailableIPs;
res = TaskManager.StartResultTask<ResultObject>("IP_ADDRESS", "ALLOCATE_PACKAGE_IP", packageId); res = TaskManager.StartResultTask<ResultObject>("IP_ADDRESS", "ALLOCATE_PACKAGE_IP", packageId);
@ -1303,7 +1303,7 @@ namespace WebsitePanel.EnterpriseServer
int maxAvailableIPs = GetUnallottedIPAddresses(packageId, groupName, pool).Count; int maxAvailableIPs = GetUnallottedIPAddresses(packageId, groupName, pool).Count;
// get quota name // get quota name
string quotaName = GetIPAddressesQuotaByResourceGroup(groupName); string quotaName = GetIPAddressesQuotaByResourceGroup(groupName, pool);
// get hosting plan IPs // get hosting plan IPs
int number = 0; int number = 0;
@ -1415,8 +1415,11 @@ namespace WebsitePanel.EnterpriseServer
return doc.InnerXml; return doc.InnerXml;
} }
private static string GetIPAddressesQuotaByResourceGroup(string groupName) private static string GetIPAddressesQuotaByResourceGroup(string groupName, IPAddressPool pool)
{ {
if (pool == IPAddressPool.PhoneNumbers)
return Quotas.LYNC_PHONE;
if (String.Compare(groupName, ResourceGroups.VPS, true) == 0) if (String.Compare(groupName, ResourceGroups.VPS, true) == 0)
{ {
return Quotas.VPS_EXTERNAL_IP_ADDRESSES_NUMBER; return Quotas.VPS_EXTERNAL_IP_ADDRESSES_NUMBER;

View file

@ -190,12 +190,12 @@ namespace WebsitePanel.EnterpriseServer
[WebMethod] [WebMethod]
public List<ExchangeAccount> SearchAccounts(int itemId, public List<ExchangeAccount> SearchAccounts(int itemId,
bool includeMailboxes, bool includeContacts, bool includeDistributionLists, bool includeMailboxes, bool includeContacts, bool includeDistributionLists,
bool includeRooms, bool includeEquipment, bool includeRooms, bool includeEquipment, bool includeSecurityGroups,
string filterColumn, string filterValue, string sortColumn) string filterColumn, string filterValue, string sortColumn)
{ {
return ExchangeServerController.SearchAccounts(itemId, return ExchangeServerController.SearchAccounts(itemId,
includeMailboxes, includeContacts, includeDistributionLists, includeMailboxes, includeContacts, includeDistributionLists,
includeRooms, includeEquipment, includeRooms, includeEquipment, includeSecurityGroups,
filterColumn, filterValue, sortColumn); filterColumn, filterValue, sortColumn);
} }

View file

@ -276,15 +276,15 @@ namespace WebsitePanel.EnterpriseServer
} }
[WebMethod] [WebMethod]
public int AddUserToSecurityGroup(int itemId, int userAccountId, string groupName) public int AddObjectToSecurityGroup(int itemId, int accountId, string groupName)
{ {
return OrganizationController.AddUserToSecurityGroup(itemId, userAccountId, groupName); return OrganizationController.AddObjectToSecurityGroup(itemId, accountId, groupName);
} }
[WebMethod] [WebMethod]
public int DeleteUserFromSecurityGroup(int itemId, int userAccountId, string groupName) public int DeleteObjectFromSecurityGroup(int itemId, int accountId, string groupName)
{ {
return OrganizationController.DeleteUserFromSecurityGroup(itemId, userAccountId, groupName); return OrganizationController.DeleteObjectFromSecurityGroup(itemId, accountId, groupName);
} }
[WebMethod] [WebMethod]
@ -294,9 +294,11 @@ namespace WebsitePanel.EnterpriseServer
} }
[WebMethod] [WebMethod]
public List<ExchangeAccount> SearchSecurityGroups(int itemId, string filterColumn, string filterValue, string sortColumn) public List<ExchangeAccount> SearchOrganizationAccounts(int itemId, string filterColumn, string filterValue,
string sortColumn, bool includeOnlySecurityGroups)
{ {
return OrganizationController.SearchSecurityGroups(itemId, filterColumn, filterValue, sortColumn); return OrganizationController.SearchOrganizationAccounts(itemId, filterColumn, filterValue, sortColumn,
includeOnlySecurityGroups);
} }
#endregion #endregion

View file

@ -44,21 +44,31 @@ namespace WebsitePanel.Providers.HostedSolution
return de; return de;
} }
public static string[] GetUsersGroup(string group) public static string[] GetGroupObjects(string group, string objectType)
{
return GetGroupObjects(group, objectType, null);
}
public static string[] GetGroupObjects(string group, string objectType, DirectoryEntry entry)
{ {
List<string> rets = new List<string>(); List<string> rets = new List<string>();
DirectorySearcher deSearch = new DirectorySearcher DirectorySearcher deSearch = new DirectorySearcher
{ {
Filter = Filter =
"(&(objectClass=user))" "(&(objectClass=" + objectType + "))"
}; };
SearchResultCollection srcUsers = deSearch.FindAll(); if (entry != null)
foreach (SearchResult srcUser in srcUsers)
{ {
DirectoryEntry de = srcUser.GetDirectoryEntry(); deSearch.SearchRoot = entry;
}
SearchResultCollection srcObjects = deSearch.FindAll();
foreach (SearchResult srcObject in srcObjects)
{
DirectoryEntry de = srcObject.GetDirectoryEntry();
PropertyValueCollection props = de.Properties["memberOf"]; PropertyValueCollection props = de.Properties["memberOf"];
foreach (string str in props) foreach (string str in props)
@ -371,20 +381,20 @@ namespace WebsitePanel.Providers.HostedSolution
newGroupObject.CommitChanges(); newGroupObject.CommitChanges();
} }
public static void AddUserToGroup(string userPath, string groupPath) public static void AddObjectToGroup(string objectPath, string groupPath)
{ {
DirectoryEntry user = new DirectoryEntry(userPath); DirectoryEntry obj = new DirectoryEntry(objectPath);
DirectoryEntry group = new DirectoryEntry(groupPath); DirectoryEntry group = new DirectoryEntry(groupPath);
group.Invoke("Add", user.Path); group.Invoke("Add", obj.Path);
} }
public static void RemoveUserFromGroup(string userPath, string groupPath) public static void RemoveObjectFromGroup(string obejctPath, string groupPath)
{ {
DirectoryEntry user = new DirectoryEntry(userPath); DirectoryEntry obj = new DirectoryEntry(obejctPath);
DirectoryEntry group = new DirectoryEntry(groupPath); DirectoryEntry group = new DirectoryEntry(groupPath);
group.Invoke("Remove", user.Path); group.Invoke("Remove", obj.Path);
} }
public static bool AdObjectExists(string path) public static bool AdObjectExists(string path)

View file

@ -50,9 +50,9 @@ namespace WebsitePanel.Providers.HostedSolution
void SetSecurityGroupGeneralSettings(string organizationId, string groupName, string[] memberAccounts, string notes); void SetSecurityGroupGeneralSettings(string organizationId, string groupName, string[] memberAccounts, string notes);
void AddUserToSecurityGroup(string organizationId, string loginName, string groupName); void AddObjectToSecurityGroup(string organizationId, string accountName, string groupName);
void DeleteUserFromSecurityGroup(string organizationId, string loginName, string groupName); void DeleteObjectFromSecurityGroup(string organizationId, string accountName, string groupName);
void SetUserGeneralSettings(string organizationId, string accountName, string displayName, string password, void SetUserGeneralSettings(string organizationId, string accountName, string displayName, string password,
bool hideFromAddressBook, bool disabled, bool locked, string firstName, string initials, bool hideFromAddressBook, bool disabled, bool locked, string firstName, string initials,

View file

@ -19,7 +19,7 @@ namespace WebsitePanel.Providers.HostedSolution
set; set;
} }
public OrganizationUser[] MembersAccounts public ExchangeAccount[] MembersAccounts
{ {
get; get;
set; set;

View file

@ -5656,7 +5656,7 @@ namespace WebsitePanel.Providers.HostedSolution
internal Collection<PSObject> ExecuteShellCommand(Runspace runSpace, Command cmd) internal Collection<PSObject> ExecuteShellCommand(Runspace runSpace, Command cmd)
{ {
return ExecuteShellCommand(runSpace, cmd, true); return ExecuteShellCommand(runSpace, cmd, false);
} }
internal Collection<PSObject> ExecuteShellCommand(Runspace runSpace, Command cmd, bool useDomainController) internal Collection<PSObject> ExecuteShellCommand(Runspace runSpace, Command cmd, bool useDomainController)

View file

@ -102,6 +102,20 @@ namespace WebsitePanel.Providers.HostedSolution
return sb.ToString(); return sb.ToString();
} }
private string GetObjectPath(string organizationId, string objName)
{
StringBuilder sb = new StringBuilder();
// append provider
AppendProtocol(sb);
AppendDomainController(sb);
AppendCNPath(sb, objName);
AppendOUPath(sb, organizationId);
AppendOUPath(sb, RootOU);
AppendDomainPath(sb, RootDomain);
return sb.ToString();
}
private string GetGroupPath(string organizationId, string groupName) private string GetGroupPath(string organizationId, string groupName)
{ {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
@ -404,7 +418,7 @@ namespace WebsitePanel.Providers.HostedSolution
HostedSolutionLog.DebugInfo("Group retrieved: {0}", groupPath); HostedSolutionLog.DebugInfo("Group retrieved: {0}", groupPath);
ActiveDirectoryUtils.AddUserToGroup(userPath, groupPath); ActiveDirectoryUtils.AddObjectToGroup(userPath, groupPath);
HostedSolutionLog.DebugInfo("Added to group: {0}", groupPath); HostedSolutionLog.DebugInfo("Added to group: {0}", groupPath);
} }
catch (Exception e) catch (Exception e)
@ -760,7 +774,7 @@ namespace WebsitePanel.Providers.HostedSolution
SearchResult resCollection = searcher.FindOne(); SearchResult resCollection = searcher.FindOne();
if (resCollection != null) if (resCollection != null)
{ {
if(resCollection.Properties["samaccountname"] != null) if (resCollection.Properties["samaccountname"] != null)
bFound = true; bFound = true;
} }
} }
@ -904,8 +918,11 @@ namespace WebsitePanel.Providers.HostedSolution
throw new ArgumentNullException("groupName"); throw new ArgumentNullException("groupName");
string path = GetGroupPath(organizationId, groupName); string path = GetGroupPath(organizationId, groupName);
string organizationPath = GetOrganizationPath(organizationId);
DirectoryEntry entry = ActiveDirectoryUtils.GetADObject(path); DirectoryEntry entry = ActiveDirectoryUtils.GetADObject(path);
DirectoryEntry organizationEntry = ActiveDirectoryUtils.GetADObject(organizationPath);
OrganizationSecurityGroup securityGroup = new OrganizationSecurityGroup(); OrganizationSecurityGroup securityGroup = new OrganizationSecurityGroup();
@ -914,11 +931,28 @@ namespace WebsitePanel.Providers.HostedSolution
securityGroup.AccountName = ActiveDirectoryUtils.GetADObjectStringProperty(entry, ADAttributes.SAMAccountName); securityGroup.AccountName = ActiveDirectoryUtils.GetADObjectStringProperty(entry, ADAttributes.SAMAccountName);
securityGroup.SAMAccountName = ActiveDirectoryUtils.GetADObjectStringProperty(entry, ADAttributes.SAMAccountName); securityGroup.SAMAccountName = ActiveDirectoryUtils.GetADObjectStringProperty(entry, ADAttributes.SAMAccountName);
List<OrganizationUser> members = new List<OrganizationUser>(); List<ExchangeAccount> members = new List<ExchangeAccount>();
foreach (string userPath in ActiveDirectoryUtils.GetUsersGroup(groupName)) foreach (string userPath in ActiveDirectoryUtils.GetGroupObjects(groupName, "user", organizationEntry))
{ {
members.Add(GetUser(userPath)); OrganizationUser tmpUser = GetUser(userPath);
members.Add(new ExchangeAccount
{
AccountName = tmpUser.AccountName,
SamAccountName = tmpUser.SamAccountName
});
}
foreach (string groupPath in ActiveDirectoryUtils.GetGroupObjects(groupName, "group", organizationEntry))
{
DirectoryEntry groupEntry = ActiveDirectoryUtils.GetADObject(groupPath);
members.Add(new ExchangeAccount
{
AccountName = ActiveDirectoryUtils.GetADObjectStringProperty(groupEntry, ADAttributes.SAMAccountName),
SamAccountName = ActiveDirectoryUtils.GetADObjectStringProperty(groupEntry, ADAttributes.SAMAccountName)
});
} }
securityGroup.MembersAccounts = members.ToArray(); securityGroup.MembersAccounts = members.ToArray();
@ -977,72 +1011,79 @@ namespace WebsitePanel.Providers.HostedSolution
ActiveDirectoryUtils.SetADObjectProperty(entry, ADAttributes.Notes, notes); ActiveDirectoryUtils.SetADObjectProperty(entry, ADAttributes.Notes, notes);
foreach(string userPath in ActiveDirectoryUtils.GetUsersGroup(groupName)) { foreach (string userPath in ActiveDirectoryUtils.GetGroupObjects(groupName, "user"))
ActiveDirectoryUtils.RemoveUserFromGroup(userPath, path); {
ActiveDirectoryUtils.RemoveObjectFromGroup(userPath, path);
} }
foreach(string user in memberAccounts) { foreach (string groupPath in ActiveDirectoryUtils.GetGroupObjects(groupName, "group"))
string userPath = GetUserPath(organizationId, user); {
ActiveDirectoryUtils.AddUserToGroup(userPath, path); ActiveDirectoryUtils.RemoveObjectFromGroup(groupPath, path);
}
foreach (string obj in memberAccounts)
{
string objPath = GetObjectPath(organizationId, obj);
ActiveDirectoryUtils.AddObjectToGroup(objPath, path);
} }
entry.CommitChanges(); entry.CommitChanges();
} }
public void AddUserToSecurityGroup(string organizationId, string loginName, string groupName) public void AddObjectToSecurityGroup(string organizationId, string accountName, string groupName)
{ {
AddUserToSecurityGroupInternal(organizationId, loginName, groupName); AddObjectToSecurityGroupInternal(organizationId, accountName, groupName);
} }
internal void AddUserToSecurityGroupInternal(string organizationId, string loginName, string groupName) internal void AddObjectToSecurityGroupInternal(string organizationId, string accountName, string groupName)
{ {
HostedSolutionLog.LogStart("AddUserToSecurityGroupInternal"); HostedSolutionLog.LogStart("AddUserToSecurityGroupInternal");
HostedSolutionLog.DebugInfo("organizationId : {0}", organizationId); HostedSolutionLog.DebugInfo("organizationId : {0}", organizationId);
HostedSolutionLog.DebugInfo("loginName : {0}", loginName); HostedSolutionLog.DebugInfo("accountName : {0}", accountName);
HostedSolutionLog.DebugInfo("groupName : {0}", groupName); HostedSolutionLog.DebugInfo("groupName : {0}", groupName);
if (string.IsNullOrEmpty(organizationId)) if (string.IsNullOrEmpty(organizationId))
throw new ArgumentNullException("organizationId"); throw new ArgumentNullException("organizationId");
if (string.IsNullOrEmpty(loginName)) if (string.IsNullOrEmpty(accountName))
throw new ArgumentNullException("loginName"); throw new ArgumentNullException("loginName");
if (string.IsNullOrEmpty(groupName)) if (string.IsNullOrEmpty(groupName))
throw new ArgumentNullException("groupName"); throw new ArgumentNullException("groupName");
string userPath = GetUserPath(organizationId, loginName); string objectPath = GetObjectPath(organizationId, accountName);
string groupPath = GetGroupPath(organizationId, groupName); string groupPath = GetGroupPath(organizationId, groupName);
ActiveDirectoryUtils.AddUserToGroup(userPath, groupPath); ActiveDirectoryUtils.AddObjectToGroup(objectPath, groupPath);
} }
public void DeleteUserFromSecurityGroup(string organizationId, string loginName, string groupName) public void DeleteObjectFromSecurityGroup(string organizationId, string accountName, string groupName)
{ {
DeleteUserFromSecurityGroupInternal(organizationId, loginName, groupName); DeleteObjectFromSecurityGroupInternal(organizationId, accountName, groupName);
} }
internal void DeleteUserFromSecurityGroupInternal(string organizationId, string loginName, string groupName) internal void DeleteObjectFromSecurityGroupInternal(string organizationId, string accountName, string groupName)
{ {
HostedSolutionLog.LogStart("AddUserToSecurityGroupInternal"); HostedSolutionLog.LogStart("AddUserToSecurityGroupInternal");
HostedSolutionLog.DebugInfo("organizationId : {0}", organizationId); HostedSolutionLog.DebugInfo("organizationId : {0}", organizationId);
HostedSolutionLog.DebugInfo("loginName : {0}", loginName); HostedSolutionLog.DebugInfo("accountName : {0}", accountName);
HostedSolutionLog.DebugInfo("groupName : {0}", groupName); HostedSolutionLog.DebugInfo("groupName : {0}", groupName);
if (string.IsNullOrEmpty(organizationId)) if (string.IsNullOrEmpty(organizationId))
throw new ArgumentNullException("organizationId"); throw new ArgumentNullException("organizationId");
if (string.IsNullOrEmpty(loginName)) if (string.IsNullOrEmpty(accountName))
throw new ArgumentNullException("loginName"); throw new ArgumentNullException("loginName");
if (string.IsNullOrEmpty(groupName)) if (string.IsNullOrEmpty(groupName))
throw new ArgumentNullException("groupName"); throw new ArgumentNullException("groupName");
string userPath = GetUserPath(organizationId, loginName); string objectPath = GetObjectPath(organizationId, accountName);
string groupPath = GetGroupPath(organizationId, groupName); string groupPath = GetGroupPath(organizationId, groupName);
ActiveDirectoryUtils.RemoveUserFromGroup(userPath, groupPath); ActiveDirectoryUtils.RemoveObjectFromGroup(objectPath, groupPath);
} }
#endregion #endregion
@ -1051,7 +1092,5 @@ namespace WebsitePanel.Providers.HostedSolution
{ {
return Environment.UserDomainName != Environment.MachineName; return Environment.UserDomainName != Environment.MachineName;
} }
} }
} }

View file

@ -85,9 +85,9 @@ namespace WebsitePanel.Providers.HostedSolution
private System.Threading.SendOrPostCallback SetSecurityGroupGeneralSettingsOperationCompleted; private System.Threading.SendOrPostCallback SetSecurityGroupGeneralSettingsOperationCompleted;
private System.Threading.SendOrPostCallback AddUserToSecurityGroupOperationCompleted; private System.Threading.SendOrPostCallback AddObjectToSecurityGroupOperationCompleted;
private System.Threading.SendOrPostCallback DeleteUserFromSecurityGroupOperationCompleted; private System.Threading.SendOrPostCallback DeleteObjectFromSecurityGroupOperationCompleted;
private System.Threading.SendOrPostCallback SetUserGeneralSettingsOperationCompleted; private System.Threading.SendOrPostCallback SetUserGeneralSettingsOperationCompleted;
@ -142,10 +142,10 @@ namespace WebsitePanel.Providers.HostedSolution
public event SetSecurityGroupGeneralSettingsCompletedEventHandler SetSecurityGroupGeneralSettingsCompleted; public event SetSecurityGroupGeneralSettingsCompletedEventHandler SetSecurityGroupGeneralSettingsCompleted;
/// <remarks/> /// <remarks/>
public event AddUserToSecurityGroupCompletedEventHandler AddUserToSecurityGroupCompleted; public event AddObjectToSecurityGroupCompletedEventHandler AddObjectToSecurityGroupCompleted;
/// <remarks/> /// <remarks/>
public event DeleteUserFromSecurityGroupCompletedEventHandler DeleteUserFromSecurityGroupCompleted; public event DeleteObjectFromSecurityGroupCompletedEventHandler DeleteObjectFromSecurityGroupCompleted;
/// <remarks/> /// <remarks/>
public event SetUserGeneralSettingsCompletedEventHandler SetUserGeneralSettingsCompleted; public event SetUserGeneralSettingsCompletedEventHandler SetUserGeneralSettingsCompleted;
@ -704,109 +704,109 @@ namespace WebsitePanel.Providers.HostedSolution
/// <remarks/> /// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/AddUserToSecurityGroup", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/AddObjectToSecurityGroup", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public void AddUserToSecurityGroup(string organizationId, string loginName, string groupName) public void AddObjectToSecurityGroup(string organizationId, string accountName, string groupName)
{ {
this.Invoke("AddUserToSecurityGroup", new object[] { this.Invoke("AddObjectToSecurityGroup", new object[] {
organizationId, organizationId,
loginName, accountName,
groupName}); groupName});
} }
/// <remarks/> /// <remarks/>
public System.IAsyncResult BeginAddUserToSecurityGroup(string organizationId, string loginName, string groupName, System.AsyncCallback callback, object asyncState) public System.IAsyncResult BeginAddObjectToSecurityGroup(string organizationId, string accountName, string groupName, System.AsyncCallback callback, object asyncState)
{ {
return this.BeginInvoke("AddUserToSecurityGroup", new object[] { return this.BeginInvoke("AddObjectToSecurityGroup", new object[] {
organizationId, organizationId,
loginName, accountName,
groupName}, callback, asyncState); groupName}, callback, asyncState);
} }
/// <remarks/> /// <remarks/>
public void EndAddUserToSecurityGroup(System.IAsyncResult asyncResult) public void EndAddObjectToSecurityGroup(System.IAsyncResult asyncResult)
{ {
this.EndInvoke(asyncResult); this.EndInvoke(asyncResult);
} }
/// <remarks/> /// <remarks/>
public void AddUserToSecurityGroupAsync(string organizationId, string loginName, string groupName) public void AddObjectToSecurityGroupAsync(string organizationId, string accountName, string groupName)
{ {
this.AddUserToSecurityGroupAsync(organizationId, loginName, groupName, null); this.AddObjectToSecurityGroupAsync(organizationId, accountName, groupName, null);
} }
/// <remarks/> /// <remarks/>
public void AddUserToSecurityGroupAsync(string organizationId, string loginName, string groupName, object userState) public void AddObjectToSecurityGroupAsync(string organizationId, string accountName, string groupName, object userState)
{ {
if ((this.AddUserToSecurityGroupOperationCompleted == null)) if ((this.AddObjectToSecurityGroupOperationCompleted == null))
{ {
this.AddUserToSecurityGroupOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddUserToSecurityGroupOperationCompleted); this.AddObjectToSecurityGroupOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddObjectToSecurityGroupOperationCompleted);
} }
this.InvokeAsync("AddUserToSecurityGroup", new object[] { this.InvokeAsync("AddObjectToSecurityGroup", new object[] {
organizationId, organizationId,
loginName, accountName,
groupName}, this.AddUserToSecurityGroupOperationCompleted, userState); groupName}, this.AddObjectToSecurityGroupOperationCompleted, userState);
} }
private void OnAddUserToSecurityGroupOperationCompleted(object arg) private void OnAddObjectToSecurityGroupOperationCompleted(object arg)
{ {
if ((this.AddUserToSecurityGroupCompleted != null)) if ((this.AddObjectToSecurityGroupCompleted != null))
{ {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.AddUserToSecurityGroupCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); this.AddObjectToSecurityGroupCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
} }
} }
/// <remarks/> /// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DeleteUserFromSecurityGroup", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DeleteObjectFromSecurityGroup", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public void DeleteUserFromSecurityGroup(string organizationId, string loginName, string groupName) public void DeleteObjectFromSecurityGroup(string organizationId, string accountName, string groupName)
{ {
this.Invoke("DeleteUserFromSecurityGroup", new object[] { this.Invoke("DeleteObjectFromSecurityGroup", new object[] {
organizationId, organizationId,
loginName, accountName,
groupName}); groupName});
} }
/// <remarks/> /// <remarks/>
public System.IAsyncResult BeginDeleteUserFromSecurityGroup(string organizationId, string loginName, string groupName, System.AsyncCallback callback, object asyncState) public System.IAsyncResult BeginDeleteObjectFromSecurityGroup(string organizationId, string accountName, string groupName, System.AsyncCallback callback, object asyncState)
{ {
return this.BeginInvoke("DeleteUserFromSecurityGroup", new object[] { return this.BeginInvoke("DeleteObjectFromSecurityGroup", new object[] {
organizationId, organizationId,
loginName, accountName,
groupName}, callback, asyncState); groupName}, callback, asyncState);
} }
/// <remarks/> /// <remarks/>
public void EndDeleteUserFromSecurityGroup(System.IAsyncResult asyncResult) public void EndDeleteObjectFromSecurityGroup(System.IAsyncResult asyncResult)
{ {
this.EndInvoke(asyncResult); this.EndInvoke(asyncResult);
} }
/// <remarks/> /// <remarks/>
public void DeleteUserFromSecurityGroupAsync(string organizationId, string loginName, string groupName) public void DeleteObjectFromSecurityGroupAsync(string organizationId, string accountName, string groupName)
{ {
this.DeleteUserFromSecurityGroupAsync(organizationId, loginName, groupName, null); this.DeleteObjectFromSecurityGroupAsync(organizationId, accountName, groupName, null);
} }
/// <remarks/> /// <remarks/>
public void DeleteUserFromSecurityGroupAsync(string organizationId, string loginName, string groupName, object userState) public void DeleteObjectFromSecurityGroupAsync(string organizationId, string accountName, string groupName, object userState)
{ {
if ((this.DeleteUserFromSecurityGroupOperationCompleted == null)) if ((this.DeleteObjectFromSecurityGroupOperationCompleted == null))
{ {
this.DeleteUserFromSecurityGroupOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteUserFromSecurityGroupOperationCompleted); this.DeleteObjectFromSecurityGroupOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteObjectFromSecurityGroupOperationCompleted);
} }
this.InvokeAsync("DeleteUserFromSecurityGroup", new object[] { this.InvokeAsync("DeleteObjectFromSecurityGroup", new object[] {
organizationId, organizationId,
loginName, accountName,
groupName}, this.DeleteUserFromSecurityGroupOperationCompleted, userState); groupName}, this.DeleteObjectFromSecurityGroupOperationCompleted, userState);
} }
private void OnDeleteUserFromSecurityGroupOperationCompleted(object arg) private void OnDeleteObjectFromSecurityGroupOperationCompleted(object arg)
{ {
if ((this.DeleteUserFromSecurityGroupCompleted != null)) if ((this.DeleteObjectFromSecurityGroupCompleted != null))
{ {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.DeleteUserFromSecurityGroupCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); this.DeleteObjectFromSecurityGroupCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
} }
} }
@ -1619,11 +1619,11 @@ namespace WebsitePanel.Providers.HostedSolution
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void AddUserToSecurityGroupCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); public delegate void AddObjectToSecurityGroupCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void DeleteUserFromSecurityGroupCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); public delegate void DeleteObjectFromSecurityGroupCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]

View file

@ -135,15 +135,15 @@ namespace WebsitePanel.Server
} }
[WebMethod, SoapHeader("settings")] [WebMethod, SoapHeader("settings")]
public void AddUserToSecurityGroup(string organizationId, string loginName, string groupName) public void AddObjectToSecurityGroup(string organizationId, string accountName, string groupName)
{ {
Organization.AddUserToSecurityGroup(organizationId, loginName, groupName); Organization.AddObjectToSecurityGroup(organizationId, accountName, groupName);
} }
[WebMethod, SoapHeader("settings")] [WebMethod, SoapHeader("settings")]
public void DeleteUserFromSecurityGroup(string organizationId, string loginName, string groupName) public void DeleteObjectFromSecurityGroup(string organizationId, string accountName, string groupName)
{ {
Organization.DeleteUserFromSecurityGroup(organizationId, loginName, groupName); Organization.DeleteObjectFromSecurityGroup(organizationId, accountName, groupName);
} }
[WebMethod, SoapHeader("settings")] [WebMethod, SoapHeader("settings")]

View file

@ -548,6 +548,7 @@
<Control key="secur_groups" src="WebsitePanel/ExchangeServer/OrganizationSecurityGroups.ascx" title="OrganizationSecurityGroups" type="View" /> <Control key="secur_groups" src="WebsitePanel/ExchangeServer/OrganizationSecurityGroups.ascx" title="OrganizationSecurityGroups" type="View" />
<Control key="create_secur_group" src="WebsitePanel/ExchangeServer/OrganizationCreateSecurityGroup.ascx" title="OrganizationSecurityGroup" type="View" /> <Control key="create_secur_group" src="WebsitePanel/ExchangeServer/OrganizationCreateSecurityGroup.ascx" title="OrganizationSecurityGroup" type="View" />
<Control key="secur_group_settings" src="WebsitePanel/ExchangeServer/OrganizationSecurityGroupGeneralSettings.ascx" title="OrganizationSecurityGroup" type="View" /> <Control key="secur_group_settings" src="WebsitePanel/ExchangeServer/OrganizationSecurityGroupGeneralSettings.ascx" title="OrganizationSecurityGroup" type="View" />
<Control key="secur_group_memberof" src="WebsitePanel/ExchangeServer/OrganizationSecurityGroupMemberOf.ascx" title="OrganizationSecurityGroupMemberOf" type="View" />
</Controls> </Controls>
</ModuleDefinition> </ModuleDefinition>

View file

@ -5341,4 +5341,22 @@
<data name="WarningDescription.PHONE_EDIT_LIST_EMPTY_ERROR" xml:space="preserve"> <data name="WarningDescription.PHONE_EDIT_LIST_EMPTY_ERROR" xml:space="preserve">
<value>At least one Phone number must be selected.</value> <value>At least one Phone number must be selected.</value>
</data> </data>
<data name="Quota.Lync.PhoneNumbers" xml:space="preserve">
<value>Phone Numbers per Organization</value>
</data>
<data name="Error.ORGANIZATION_CREATE_USER" xml:space="preserve">
<value>Error creating user. See audit log for more details.</value>
</data>
<data name="Error.ORGANIZATION_CREATE_SECURITY_GROUP" xml:space="preserve">
<value>Error creating security group. See audit log for more details.</value>
</data>
<data name="Error.ORGANIZATION_GET_SECURITY_GROUP_SETTINGS" xml:space="preserve">
<value>Error reading group settings</value>
</data>
<data name="Error.ORGANIZATION_UPDATE_SECURITY_GROUP_SETTINGS" xml:space="preserve">
<value>Error updating group settings</value>
</data>
<data name="Success.ORGANIZATION_UPDATE_SECURITY_GROUP_SETTINGS" xml:space="preserve">
<value>Group general settings have been successfully updated.</value>
</data>
</root> </root>

View file

@ -198,4 +198,7 @@
<data name="lblOrganizations.Text" xml:space="preserve"> <data name="lblOrganizations.Text" xml:space="preserve">
<value>Organizations:</value> <value>Organizations:</value>
</data> </data>
<data name="lblLyncPhone.Text" xml:space="preserve">
<value>Lync Phone Numbers:</value>
</data>
</root> </root>

View file

@ -0,0 +1,135 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="btnSave.OnClientClick" xml:space="preserve">
<value>ShowProgressDialog('Updating...');</value>
</data>
<data name="btnSave.Text" xml:space="preserve">
<value>Save Changes</value>
</data>
<data name="locTitle.Text" xml:space="preserve">
<value>Edit Group </value>
</data>
<data name="secGeneral.Text" xml:space="preserve">
<value>General</value>
</data>
<data name="Text.PageName" xml:space="preserve">
<value>Groups</value>
</data>
</root>

View file

@ -2,7 +2,7 @@
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %> <%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
<%@ Register Src="UserControls/AccountsList.ascx" TagName="AccountsList" TagPrefix="wsp" %> <%@ Register Src="UserControls/AccountsList.ascx" TagName="AccountsList" TagPrefix="wsp" %>
<%@ Register Src="UserControls/MailboxSelector.ascx" TagName="MailboxSelector" TagPrefix="wsp" %> <%@ Register Src="UserControls/MailboxSelector.ascx" TagName="MailboxSelector" TagPrefix="wsp" %>
<%@ Register Src="UserControls/DistributionListTabs.ascx" TagName="DistributionListTabs" TagPrefix="wsp" %> <%@ Register Src="UserControls/SecurityGroupTabs.ascx" TagName="SecurityGroupTabs" TagPrefix="wsp" %>
<%@ Register Src="UserControls/Menu.ascx" TagName="Menu" TagPrefix="wsp" %> <%@ Register Src="UserControls/Menu.ascx" TagName="Menu" TagPrefix="wsp" %>
<%@ Register Src="UserControls/Breadcrumb.ascx" TagName="Breadcrumb" TagPrefix="wsp" %> <%@ Register Src="UserControls/Breadcrumb.ascx" TagName="Breadcrumb" TagPrefix="wsp" %>
<%@ Register TagPrefix="wsp" TagName="CollapsiblePanel" Src="../UserControls/CollapsiblePanel.ascx" %> <%@ Register TagPrefix="wsp" TagName="CollapsiblePanel" Src="../UserControls/CollapsiblePanel.ascx" %>
@ -27,19 +27,20 @@
<asp:Literal ID="litDisplayName" runat="server" Text="John Smith" /> <asp:Literal ID="litDisplayName" runat="server" Text="John Smith" />
</div> </div>
<div class="FormBody"> <div class="FormBody">
<wsp:DistributionListTabs id="tabs" runat="server" SelectedTab="dlist_memberof" /> <wsp:SecurityGroupTabs id="tabs" runat="server" SelectedTab="secur_group_memberof" />
<wsp:SimpleMessageBox id="messageBox" runat="server" /> <wsp:SimpleMessageBox id="messageBox" runat="server" />
<wsp:CollapsiblePanel id="secDistributionLists" runat="server" TargetControlID="DistributionLists" meta:resourcekey="secDistributionLists" Text="Distribution Lists"></wsp:CollapsiblePanel> <wsp:CollapsiblePanel id="secGroups" runat="server" TargetControlID="GroupsPanel" meta:resourcekey="secGroups" Text="Groups"></wsp:CollapsiblePanel>
<asp:Panel ID="DistributionLists" runat="server" Height="0" style="overflow:hidden;"> <asp:Panel ID="GroupsPanel" runat="server" Height="0" style="overflow:hidden;">
<asp:UpdatePanel ID="GeneralUpdatePanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true"> <asp:UpdatePanel ID="GeneralUpdatePanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
<ContentTemplate> <ContentTemplate>
<wsp:AccountsList id="distrlists" runat="server" <wsp:AccountsList id="groups" runat="server"
MailboxesEnabled="false" MailboxesEnabled="false"
EnableMailboxOnly="true" EnableMailboxOnly="true"
ContactsEnabled="false" ContactsEnabled="false"
DistributionListsEnabled="true" /> DistributionListsEnabled="true"
SecurityGroupsEnabled="true" />
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>

View file

@ -67,7 +67,20 @@ namespace WebsitePanel.Portal.ExchangeServer
ExchangeAccount[] dLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID); ExchangeAccount[] dLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
distrlists.SetAccounts(dLists); ExchangeAccount[] secGroups = ES.Services.Organizations.GetSecurityGroupsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
List<ExchangeAccount> groupsList = new List<ExchangeAccount>();
foreach (ExchangeAccount distList in dLists)
{
groupsList.Add(distList);
}
foreach (ExchangeAccount secGroup in secGroups)
{
groupsList.Add(secGroup);
}
groups.SetAccounts(groupsList.ToArray());
} }
catch (Exception ex) catch (Exception ex)
@ -83,18 +96,53 @@ namespace WebsitePanel.Portal.ExchangeServer
try try
{ {
ExchangeAccount[] oldDistributionLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID); ExchangeAccount[] oldSecGroups = ES.Services.Organizations.GetSecurityGroupsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
List<string> newDistributionLists = new List<string>(distrlists.GetAccounts()); ExchangeAccount[] oldDistLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
foreach (ExchangeAccount oldlist in oldDistributionLists)
IList<ExchangeAccount> oldGroups = new List<ExchangeAccount>();
foreach (ExchangeAccount distList in oldSecGroups)
{ {
if (newDistributionLists.Contains(oldlist.AccountName)) oldGroups.Add(distList);
newDistributionLists.Remove(oldlist.AccountName);
else
ES.Services.ExchangeServer.DeleteDistributionListMember(PanelRequest.ItemID, oldlist.AccountName, PanelRequest.AccountID);
} }
foreach (string newlist in newDistributionLists) foreach (ExchangeAccount secGroup in oldDistLists)
ES.Services.ExchangeServer.AddDistributionListMember(PanelRequest.ItemID, newlist, PanelRequest.AccountID); {
oldGroups.Add(secGroup);
}
IDictionary<string, ExchangeAccountType> newGroups = groups.GetFullAccounts();
foreach (ExchangeAccount oldGroup in oldGroups)
{
if (newGroups.ContainsKey(oldGroup.AccountName))
{
newGroups.Remove(oldGroup.AccountName);
}
else
{
switch (oldGroup.AccountType)
{
case ExchangeAccountType.DistributionList:
ES.Services.ExchangeServer.DeleteDistributionListMember(PanelRequest.ItemID, oldGroup.AccountName, PanelRequest.AccountID);
break;
case ExchangeAccountType.SecurityGroup:
ES.Services.Organizations.DeleteObjectFromSecurityGroup(PanelRequest.ItemID, PanelRequest.AccountID, oldGroup.AccountName);
break;
}
}
}
foreach (KeyValuePair<string, ExchangeAccountType> newGroup in newGroups)
{
switch (newGroup.Value)
{
case ExchangeAccountType.DistributionList:
ES.Services.ExchangeServer.AddDistributionListMember(PanelRequest.ItemID, newGroup.Key, PanelRequest.AccountID);
break;
case ExchangeAccountType.SecurityGroup:
ES.Services.Organizations.AddObjectToSecurityGroup(PanelRequest.ItemID, PanelRequest.AccountID, newGroup.Key);
break;
}
}
messageBox.ShowSuccessMessage("EXCHANGE_UPDATE_DLIST_SETTINGS"); messageBox.ShowSuccessMessage("EXCHANGE_UPDATE_DLIST_SETTINGS");
BindSettings(); BindSettings();

View file

@ -1,3 +1,31 @@
// Copyright (c) 2012, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
@ -73,7 +101,7 @@ namespace WebsitePanel.Portal.ExchangeServer {
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.DistributionListTabs tabs; protected global::WebsitePanel.Portal.ExchangeServer.UserControls.SecurityGroupTabs tabs;
/// <summary> /// <summary>
/// messageBox control. /// messageBox control.
@ -85,22 +113,22 @@ namespace WebsitePanel.Portal.ExchangeServer {
protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox; protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
/// <summary> /// <summary>
/// secDistributionLists control. /// secGroups control.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secDistributionLists; protected global::WebsitePanel.Portal.CollapsiblePanel secGroups;
/// <summary> /// <summary>
/// DistributionLists control. /// GroupsPanel control.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Panel DistributionLists; protected global::System.Web.UI.WebControls.Panel GroupsPanel;
/// <summary> /// <summary>
/// GeneralUpdatePanel control. /// GeneralUpdatePanel control.
@ -112,13 +140,13 @@ namespace WebsitePanel.Portal.ExchangeServer {
protected global::System.Web.UI.UpdatePanel GeneralUpdatePanel; protected global::System.Web.UI.UpdatePanel GeneralUpdatePanel;
/// <summary> /// <summary>
/// distrlists control. /// groups control.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.AccountsList distrlists; protected global::WebsitePanel.Portal.ExchangeServer.UserControls.AccountsList groups;
/// <summary> /// <summary>
/// btnSave control. /// btnSave control.

View file

@ -32,16 +32,17 @@
<wsp:MailboxTabs id="tabs" runat="server" SelectedTab="mailbox_memberof" /> <wsp:MailboxTabs id="tabs" runat="server" SelectedTab="mailbox_memberof" />
<wsp:SimpleMessageBox id="messageBox" runat="server" /> <wsp:SimpleMessageBox id="messageBox" runat="server" />
<wsp:CollapsiblePanel id="secDistributionLists" runat="server" TargetControlID="DistributionLists" meta:resourcekey="secDistributionLists" Text="Distribution Lists"></wsp:CollapsiblePanel> <wsp:CollapsiblePanel id="secGroups" runat="server" TargetControlID="GroupsPanel" meta:resourcekey="secGroups" Text="Groups"></wsp:CollapsiblePanel>
<asp:Panel ID="DistributionLists" runat="server" Height="0" style="overflow:hidden;"> <asp:Panel ID="GroupsPanel" runat="server" Height="0" style="overflow:hidden;">
<asp:UpdatePanel ID="GeneralUpdatePanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true"> <asp:UpdatePanel ID="GeneralUpdatePanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
<ContentTemplate> <ContentTemplate>
<wsp:AccountsList id="distrlists" runat="server" <wsp:AccountsList id="groups" runat="server"
MailboxesEnabled="false" MailboxesEnabled="false"
EnableMailboxOnly="true" EnableMailboxOnly="true"
ContactsEnabled="false" ContactsEnabled="false"
DistributionListsEnabled="true" /> DistributionListsEnabled="true"
SecurityGroupsEnabled="true" />
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>

View file

@ -59,10 +59,24 @@ namespace WebsitePanel.Portal.ExchangeServer
// title // title
litDisplayName.Text = mailbox.DisplayName; litDisplayName.Text = mailbox.DisplayName;
//Distribution Lists
ExchangeAccount[] dLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID); ExchangeAccount[] dLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
distrlists.SetAccounts(dLists); //Security Groups
ExchangeAccount[] securGroups = ES.Services.Organizations.GetSecurityGroupsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
List<ExchangeAccount> groupsList = new List<ExchangeAccount>();
foreach (ExchangeAccount distList in dLists)
{
groupsList.Add(distList);
}
foreach (ExchangeAccount secGroup in securGroups)
{
groupsList.Add(secGroup);
}
groups.SetAccounts(groupsList.ToArray());
} }
catch (Exception ex) catch (Exception ex)
@ -78,18 +92,53 @@ namespace WebsitePanel.Portal.ExchangeServer
try try
{ {
ExchangeAccount[] oldDistributionLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID); ExchangeAccount[] oldSecGroups = ES.Services.Organizations.GetSecurityGroupsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
List<string> newDistributionLists = new List<string>(distrlists.GetAccounts()); ExchangeAccount[] oldDistLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
foreach (ExchangeAccount oldlist in oldDistributionLists)
IList<ExchangeAccount> oldGroups = new List<ExchangeAccount>();
foreach (ExchangeAccount distList in oldSecGroups)
{ {
if (newDistributionLists.Contains(oldlist.AccountName)) oldGroups.Add(distList);
newDistributionLists.Remove(oldlist.AccountName);
else
ES.Services.ExchangeServer.DeleteDistributionListMember(PanelRequest.ItemID, oldlist.AccountName, PanelRequest.AccountID);
} }
foreach (string newlist in newDistributionLists) foreach (ExchangeAccount secGroup in oldDistLists)
ES.Services.ExchangeServer.AddDistributionListMember(PanelRequest.ItemID, newlist, PanelRequest.AccountID); {
oldGroups.Add(secGroup);
}
IDictionary<string, ExchangeAccountType> newGroups = groups.GetFullAccounts();
foreach (ExchangeAccount oldGroup in oldGroups)
{
if (newGroups.ContainsKey(oldGroup.AccountName))
{
newGroups.Remove(oldGroup.AccountName);
}
else
{
switch (oldGroup.AccountType)
{
case ExchangeAccountType.DistributionList:
ES.Services.ExchangeServer.DeleteDistributionListMember(PanelRequest.ItemID, oldGroup.AccountName, PanelRequest.AccountID);
break;
case ExchangeAccountType.SecurityGroup:
ES.Services.Organizations.DeleteObjectFromSecurityGroup(PanelRequest.ItemID, PanelRequest.AccountID, oldGroup.AccountName);
break;
}
}
}
foreach (KeyValuePair<string, ExchangeAccountType> newGroup in newGroups)
{
switch (newGroup.Value)
{
case ExchangeAccountType.DistributionList:
ES.Services.ExchangeServer.AddDistributionListMember(PanelRequest.ItemID, newGroup.Key, PanelRequest.AccountID);
break;
case ExchangeAccountType.SecurityGroup:
ES.Services.Organizations.AddObjectToSecurityGroup(PanelRequest.ItemID, PanelRequest.AccountID, newGroup.Key);
break;
}
}
messageBox.ShowSuccessMessage("EXCHANGE_UPDATE_MAILBOX_SETTINGS"); messageBox.ShowSuccessMessage("EXCHANGE_UPDATE_MAILBOX_SETTINGS");
BindSettings(); BindSettings();
@ -104,7 +153,5 @@ namespace WebsitePanel.Portal.ExchangeServer
{ {
SaveSettings(); SaveSettings();
} }
} }
} }

View file

@ -1,3 +1,31 @@
// Copyright (c) 2012, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
@ -85,22 +113,22 @@ namespace WebsitePanel.Portal.ExchangeServer {
protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox; protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
/// <summary> /// <summary>
/// secDistributionLists control. /// secGroups control.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secDistributionLists; protected global::WebsitePanel.Portal.CollapsiblePanel secGroups;
/// <summary> /// <summary>
/// DistributionLists control. /// GroupsPanel control.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Panel DistributionLists; protected global::System.Web.UI.WebControls.Panel GroupsPanel;
/// <summary> /// <summary>
/// GeneralUpdatePanel control. /// GeneralUpdatePanel control.
@ -112,13 +140,13 @@ namespace WebsitePanel.Portal.ExchangeServer {
protected global::System.Web.UI.UpdatePanel GeneralUpdatePanel; protected global::System.Web.UI.UpdatePanel GeneralUpdatePanel;
/// <summary> /// <summary>
/// distrlists control. /// groups control.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.AccountsList distrlists; protected global::WebsitePanel.Portal.ExchangeServer.UserControls.AccountsList groups;
/// <summary> /// <summary>
/// btnSave control. /// btnSave control.

View file

@ -128,7 +128,7 @@ namespace WebsitePanel.Portal.HostedSolution
} }
catch (Exception ex) catch (Exception ex)
{ {
messageBox.ShowErrorMessage("EXCHANGE_CREATE_MAILBOX", ex); messageBox.ShowErrorMessage("ORGANIZATION_CREATE_USER", ex);
} }
} }

View file

@ -76,6 +76,7 @@ namespace WebsitePanel.Portal.ExchangeServer
members.Enabled = false; members.Enabled = false;
btnSave.Visible = false; btnSave.Visible = false;
tabs.IsDefault = true;
} }
} }
catch (Exception ex) catch (Exception ex)

View file

@ -0,0 +1,59 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="OrganizationSecurityGroupMemberOf.ascx.cs" Inherits="WebsitePanel.Portal.HostedSolution.OrganizationSecurityGroupMemberOf" %>
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/CollapsiblePanel.ascx" TagName="CollapsiblePanel" TagPrefix="wsp" %>
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
<%@ Register Src="UserControls/Menu.ascx" TagName="Menu" TagPrefix="wsp" %>
<%@ Register Src="UserControls/Breadcrumb.ascx" TagName="Breadcrumb" TagPrefix="wsp" %>
<%@ Register Src="UserControls/AccountsList.ascx" TagName="AccountsList" TagPrefix="wsp" %>
<%@ Register Src="UserControls/SecurityGroupTabs.ascx" TagName="SecurityGroupTabs" TagPrefix="wsp"%>
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/>
<div id="ExchangeContainer">
<div class="Module">
<div class="Header">
<wsp:Breadcrumb id="breadcrumb" runat="server" PageName="Text.PageName" />
</div>
<div class="Left">
<wsp:Menu id="menu" runat="server" SelectedItem="mailboxes" />
</div>
<div class="Content">
<div class="Center">
<div class="Title">
<asp:Image ID="Image1" SkinID="OrganizationUser48" runat="server" />
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Edit User"></asp:Localize>
-
<asp:Literal ID="litDisplayName" runat="server" Text="John Smith" />
</div>
<div class="FormBody">
<wsp:SecurityGroupTabs id="tabs" runat="server" SelectedTab="secur_group_memberof" />
<wsp:SimpleMessageBox id="messageBox" runat="server" />
<wsp:CollapsiblePanel id="secGroups" runat="server" TargetControlID="GroupsPanel" meta:resourcekey="secGroups" Text="Groups"></wsp:CollapsiblePanel>
<asp:Panel ID="GroupsPanel" runat="server" Height="0" style="overflow:hidden;">
<asp:UpdatePanel ID="GeneralUpdatePanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
<ContentTemplate>
<wsp:AccountsList id="groups" runat="server"
MailboxesEnabled="false"
EnableMailboxOnly="true"
ContactsEnabled="false"
DistributionListsEnabled="true"
SecurityGroupsEnabled="true" />
</ContentTemplate>
</asp:UpdatePanel>
</asp:Panel>
<div class="FormFooterClean">
<asp:Button id="btnSave" runat="server" Text="Save Changes" CssClass="Button1"
meta:resourcekey="btnSave" ValidationGroup="EditMailbox" OnClick="btnSave_Click"></asp:Button>
<asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="True" ShowSummary="False" ValidationGroup="EditMailbox" />
</div>
</div>
</div>
</div>
</div>
</div>

View file

@ -0,0 +1,140 @@
// Copyright (c) 2012, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (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 System;
using System.Web.UI.WebControls;
using System.Collections.Generic;
using WebsitePanel.EnterpriseServer;
using WebsitePanel.Providers.HostedSolution;
using WebsitePanel.Providers.ResultObjects;
namespace WebsitePanel.Portal.HostedSolution
{
public partial class OrganizationSecurityGroupMemberOf : WebsitePanelModuleBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BindSettings();
}
}
private void BindSettings()
{
try
{
// get settings
OrganizationSecurityGroup group = ES.Services.Organizations.GetSecurityGroupGeneralSettings(PanelRequest.ItemID, PanelRequest.AccountID);
litDisplayName.Text = group.DisplayName;
//Distribution Lists
ExchangeAccount[] dLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
//Security Groups
ExchangeAccount[] securGroups = ES.Services.Organizations.GetSecurityGroupsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
List<ExchangeAccount> groupsList = new List<ExchangeAccount>();
foreach (ExchangeAccount distList in dLists)
{
groupsList.Add(distList);
}
foreach (ExchangeAccount secGroup in securGroups)
{
groupsList.Add(secGroup);
}
groups.SetAccounts(groupsList.ToArray());
}
catch (Exception ex)
{
messageBox.ShowErrorMessage("ORGANIZATION_GET_GROUP_SETTINGS", ex);
}
}
private void SaveSettings()
{
if (!Page.IsValid)
return;
try
{
ExchangeAccount[] oldSecGroups = ES.Services.Organizations.GetSecurityGroupsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
ExchangeAccount[] oldDistLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
IList<ExchangeAccount> oldGroups = new List<ExchangeAccount>();
foreach (ExchangeAccount distList in oldSecGroups)
{
oldGroups.Add(distList);
}
foreach (ExchangeAccount secGroup in oldDistLists)
{
oldGroups.Add(secGroup);
}
IDictionary<string, ExchangeAccountType> newGroups = groups.GetFullAccounts();
foreach (ExchangeAccount oldGroup in oldGroups)
{
if (newGroups.ContainsKey(oldGroup.AccountName))
{
newGroups.Remove(oldGroup.AccountName);
}
else
{
ES.Services.Organizations.DeleteObjectFromSecurityGroup(PanelRequest.ItemID, PanelRequest.AccountID, oldGroup.AccountName);
}
}
foreach (KeyValuePair<string, ExchangeAccountType> newGroup in newGroups)
{
ES.Services.Organizations.AddObjectToSecurityGroup(PanelRequest.ItemID, PanelRequest.AccountID, newGroup.Key);
}
messageBox.ShowSuccessMessage("ORGANIZATION_UPDATE_SECURITY_GROUP_SETTINGS");
BindSettings();
}
catch (Exception ex)
{
messageBox.ShowErrorMessage("ORGANIZATION_UPDATE_SECURITY_GROUP_SETTINGS", ex);
}
}
protected void btnSave_Click(object sender, EventArgs e)
{
SaveSettings();
}
}
}

View file

@ -0,0 +1,169 @@
// Copyright (c) 2012, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace WebsitePanel.Portal.HostedSolution {
public partial class OrganizationSecurityGroupMemberOf {
/// <summary>
/// asyncTasks control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks;
/// <summary>
/// breadcrumb control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Breadcrumb breadcrumb;
/// <summary>
/// menu control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Menu menu;
/// <summary>
/// Image1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Image Image1;
/// <summary>
/// locTitle control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize locTitle;
/// <summary>
/// litDisplayName control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Literal litDisplayName;
/// <summary>
/// tabs control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.SecurityGroupTabs tabs;
/// <summary>
/// messageBox control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
/// <summary>
/// secGroups control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secGroups;
/// <summary>
/// GroupsPanel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Panel GroupsPanel;
/// <summary>
/// GeneralUpdatePanel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.UpdatePanel GeneralUpdatePanel;
/// <summary>
/// groups control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.AccountsList groups;
/// <summary>
/// btnSave control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Button btnSave;
/// <summary>
/// ValidationSummary1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.ValidationSummary ValidationSummary1;
}
}

View file

@ -43,27 +43,17 @@
<uc1:MailboxTabs ID="MailboxTabsId" runat="server" SelectedTab="user_memberof" /> <uc1:MailboxTabs ID="MailboxTabsId" runat="server" SelectedTab="user_memberof" />
<wsp:SimpleMessageBox id="messageBox" runat="server" /> <wsp:SimpleMessageBox id="messageBox" runat="server" />
<wsp:CollapsiblePanel id="secDistributionLists" runat="server" TargetControlID="DistributionListsPanel" meta:resourcekey="secDistributionLists" Text="Distribution Lists"></wsp:CollapsiblePanel> <wsp:CollapsiblePanel id="secGroups" runat="server" TargetControlID="GroupsPanel" meta:resourcekey="secGroups" Text="Groups"></wsp:CollapsiblePanel>
<asp:Panel ID="DistributionListsPanel" runat="server" Height="0" style="overflow:hidden;"> <asp:Panel ID="GroupsPanel" runat="server" Height="0" style="overflow:hidden;">
<asp:UpdatePanel ID="DLGeneralUpdatePanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true"> <asp:UpdatePanel ID="GeneralUpdatePanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
<ContentTemplate> <ContentTemplate>
<wsp:AccountsList id="distrlists" runat="server" <wsp:AccountsList id="groups" runat="server"
MailboxesEnabled="false" MailboxesEnabled="false"
EnableMailboxOnly="true" EnableMailboxOnly="true"
ContactsEnabled="false" ContactsEnabled="false"
DistributionListsEnabled="true" /> DistributionListsEnabled="true"
SecurityGroupsEnabled="true" />
</ContentTemplate>
</asp:UpdatePanel>
</asp:Panel>
<wsp:CollapsiblePanel id="secSecurityGroups" runat="server" TargetControlID="SecurityGroupsPanel" meta:resourcekey="secSecurityGroups" Text="Groups"></wsp:CollapsiblePanel>
<asp:Panel ID="SecurityGroupsPanel" runat="server" Height="0" style="overflow:hidden;">
<asp:UpdatePanel ID="SCGeneralUpdatePanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
<ContentTemplate>
<wsp:GroupsList id="securegroups" runat="server" />
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>

View file

@ -44,6 +44,7 @@ namespace WebsitePanel.Portal.HostedSolution
BindSettings(); BindSettings();
MailboxTabsId.Visible = (PanelRequest.Context == "Mailbox"); MailboxTabsId.Visible = (PanelRequest.Context == "Mailbox");
UserTabsId.Visible = (PanelRequest.Context == "User"); UserTabsId.Visible = (PanelRequest.Context == "User");
} }
} }
@ -53,26 +54,37 @@ namespace WebsitePanel.Portal.HostedSolution
try try
{ {
// get settings // get settings
ExchangeMailbox mailbox = ES.Services.ExchangeServer.GetMailboxGeneralSettings(PanelRequest.ItemID, OrganizationUser user = ES.Services.Organizations.GetUserGeneralSettings(PanelRequest.ItemID, PanelRequest.AccountID);
PanelRequest.AccountID);
// title groups.DistributionListsEnabled = (user.AccountType == ExchangeAccountType.Mailbox
litDisplayName.Text = mailbox.DisplayName; || user.AccountType == ExchangeAccountType.Room
|| user.AccountType == ExchangeAccountType.Equipment);
litDisplayName.Text = user.DisplayName;
//Distribution Lists //Distribution Lists
ExchangeAccount[] dLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID); ExchangeAccount[] dLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
distrlists.SetAccounts(dLists);
//Security Groups //Security Groups
ExchangeAccount[] securGroups = ES.Services.Organizations.GetSecurityGroupsByMember(PanelRequest.ItemID, PanelRequest.AccountID); ExchangeAccount[] securGroups = ES.Services.Organizations.GetSecurityGroupsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
securegroups.SetAccounts(securGroups); List<ExchangeAccount> groupsList = new List<ExchangeAccount>();
foreach (ExchangeAccount distList in dLists)
{
groupsList.Add(distList);
}
foreach (ExchangeAccount secGroup in securGroups)
{
groupsList.Add(secGroup);
}
groups.SetAccounts(groupsList.ToArray());
} }
catch (Exception ex) catch (Exception ex)
{ {
messageBox.ShowErrorMessage("EXCHANGE_GET_MAILBOX_SETTINGS", ex); messageBox.ShowErrorMessage("ORGANIZATION_GET_USER_SETTINGS", ex);
} }
} }
@ -83,48 +95,62 @@ namespace WebsitePanel.Portal.HostedSolution
try try
{ {
//Distribution Lists ExchangeAccount[] oldSecGroups = ES.Services.Organizations.GetSecurityGroupsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
ExchangeAccount[] oldDistributionLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID); ExchangeAccount[] oldDistLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
List<string> newDistributionLists = new List<string>(distrlists.GetAccounts());
foreach (ExchangeAccount oldlist in oldDistributionLists) IList<ExchangeAccount> oldGroups = new List<ExchangeAccount>();
foreach (ExchangeAccount distList in oldSecGroups)
{ {
if (newDistributionLists.Contains(oldlist.AccountName)) oldGroups.Add(distList);
newDistributionLists.Remove(oldlist.AccountName);
else
ES.Services.ExchangeServer.DeleteDistributionListMember(PanelRequest.ItemID, oldlist.AccountName, PanelRequest.AccountID);
} }
foreach (string newlist in newDistributionLists) foreach (ExchangeAccount secGroup in oldDistLists)
ES.Services.ExchangeServer.AddDistributionListMember(PanelRequest.ItemID, newlist, PanelRequest.AccountID); {
oldGroups.Add(secGroup);
}
//Security Groups IDictionary<string, ExchangeAccountType> newGroups = groups.GetFullAccounts();
ExchangeAccount[] oldDSecurityGroups = ES.Services.Organizations.GetSecurityGroupsByMember(PanelRequest.ItemID, PanelRequest.AccountID); foreach (ExchangeAccount oldGroup in oldGroups)
List<string> newSecurityGroups = new List<string>(securegroups.GetAccounts());
foreach (ExchangeAccount oldgroup in oldDSecurityGroups)
{ {
if (newSecurityGroups.Contains(oldgroup.AccountName)) if (newGroups.ContainsKey(oldGroup.AccountName))
{ {
newSecurityGroups.Remove(oldgroup.AccountName); newGroups.Remove(oldGroup.AccountName);
} }
else else
{ {
ES.Services.Organizations.DeleteUserFromSecurityGroup(PanelRequest.ItemID, PanelRequest.AccountID, oldgroup.AccountName); switch (oldGroup.AccountType)
}
}
foreach (string newgroup in newSecurityGroups)
{ {
ES.Services.Organizations.AddUserToSecurityGroup(PanelRequest.ItemID, PanelRequest.AccountID, newgroup); case ExchangeAccountType.DistributionList:
ES.Services.ExchangeServer.DeleteDistributionListMember(PanelRequest.ItemID, oldGroup.AccountName, PanelRequest.AccountID);
break;
case ExchangeAccountType.SecurityGroup:
ES.Services.Organizations.DeleteObjectFromSecurityGroup(PanelRequest.ItemID, PanelRequest.AccountID, oldGroup.AccountName);
break;
}
}
} }
messageBox.ShowSuccessMessage("EXCHANGE_UPDATE_MAILBOX_SETTINGS"); foreach (KeyValuePair<string, ExchangeAccountType> newGroup in newGroups)
{
switch (newGroup.Value)
{
case ExchangeAccountType.DistributionList:
ES.Services.ExchangeServer.AddDistributionListMember(PanelRequest.ItemID, newGroup.Key, PanelRequest.AccountID);
break;
case ExchangeAccountType.SecurityGroup:
ES.Services.Organizations.AddObjectToSecurityGroup(PanelRequest.ItemID, PanelRequest.AccountID, newGroup.Key);
break;
}
}
messageBox.ShowSuccessMessage("ORGANIZATION_UPDATE_USER_SETTINGS");
BindSettings(); BindSettings();
} }
catch (Exception ex) catch (Exception ex)
{ {
messageBox.ShowErrorMessage("EXCHANGE_UPDATE_MAILBOX_SETTINGS", ex); messageBox.ShowErrorMessage("ORGANIZATION_UPDATE_USER_SETTINGS", ex);
} }
} }

View file

@ -123,76 +123,40 @@ namespace WebsitePanel.Portal.HostedSolution {
protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox; protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
/// <summary> /// <summary>
/// secDistributionLists control. /// secGroups control.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secDistributionLists; protected global::WebsitePanel.Portal.CollapsiblePanel secGroups;
/// <summary> /// <summary>
/// DistributionListsPanel control. /// GroupsPanel control.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Panel DistributionListsPanel; protected global::System.Web.UI.WebControls.Panel GroupsPanel;
/// <summary> /// <summary>
/// DLGeneralUpdatePanel control. /// GeneralUpdatePanel control.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.UpdatePanel DLGeneralUpdatePanel; protected global::System.Web.UI.UpdatePanel GeneralUpdatePanel;
/// <summary> /// <summary>
/// distrlists control. /// groups control.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.AccountsList distrlists; protected global::WebsitePanel.Portal.ExchangeServer.UserControls.AccountsList groups;
/// <summary>
/// secSecurityGroups control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secSecurityGroups;
/// <summary>
/// SecurityGroupsPanel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Panel SecurityGroupsPanel;
/// <summary>
/// SCGeneralUpdatePanel control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.UpdatePanel SCGeneralUpdatePanel;
/// <summary>
/// securegroups control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.GroupsList securegroups;
/// <summary> /// <summary>
/// btnSave control. /// btnSave control.

View file

@ -37,6 +37,13 @@
<asp:Literal ID="litPrimaryEmailAddress" runat="server" Text='<%# Eval("PrimaryEmailAddress") %>'></asp:Literal> <asp:Literal ID="litPrimaryEmailAddress" runat="server" Text='<%# Eval("PrimaryEmailAddress") %>'></asp:Literal>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField meta:resourcekey="gvAccountsAccountType" HeaderText="gvAccountsAccountType">
<HeaderStyle Wrap="false" />
<ItemStyle Width="50%" Wrap="false"></ItemStyle>
<ItemTemplate>
<asp:Literal ID="litType" runat="server" Text='<%# GetType((int)Eval("AccountType")) %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
</Columns> </Columns>
</asp:GridView> </asp:GridView>
@ -69,6 +76,8 @@
meta:resourcekey="chkIncludeContacts" AutoPostBack="true" CssClass="Normal" OnCheckedChanged="chkIncludeMailboxes_CheckedChanged" /> meta:resourcekey="chkIncludeContacts" AutoPostBack="true" CssClass="Normal" OnCheckedChanged="chkIncludeMailboxes_CheckedChanged" />
<asp:CheckBox ID="chkIncludeLists" runat="server" Text="Distribution Lists" Checked="true" <asp:CheckBox ID="chkIncludeLists" runat="server" Text="Distribution Lists" Checked="true"
meta:resourcekey="chkIncludeLists" AutoPostBack="true" CssClass="Normal" OnCheckedChanged="chkIncludeMailboxes_CheckedChanged" /> meta:resourcekey="chkIncludeLists" AutoPostBack="true" CssClass="Normal" OnCheckedChanged="chkIncludeMailboxes_CheckedChanged" />
<asp:CheckBox ID="chkIncludeGroups" runat="server" Text="Groups" Checked="true"
meta:resourcekey="chkIncludeGroups" AutoPostBack="true" CssClass="Normal" OnCheckedChanged="chkIncludeMailboxes_CheckedChanged" />
</div> </div>
<div class="FormButtonsBarClean"> <div class="FormButtonsBarClean">
<div class="FormButtonsBarCleanRight"> <div class="FormButtonsBarCleanRight">
@ -109,6 +118,12 @@
<asp:Literal ID="litPrimaryEmailAddress" runat="server" Text='<%# Eval("PrimaryEmailAddress") %>'></asp:Literal> <asp:Literal ID="litPrimaryEmailAddress" runat="server" Text='<%# Eval("PrimaryEmailAddress") %>'></asp:Literal>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField meta:resourcekey="gvAccountsAccountType" HeaderText="gvAccountsAccountType">
<ItemStyle Width="50%"></ItemStyle>
<ItemTemplate>
<asp:Literal ID="litType" runat="server" Text='<%# GetType((int)Eval("AccountType")) %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
</Columns> </Columns>
</asp:GridView> </asp:GridView>
</div> </div>

View file

@ -27,6 +27,7 @@
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System; using System;
using System.Linq;
using System.Collections.Generic; using System.Collections.Generic;
using System.Web.UI; using System.Web.UI;
using System.Web.UI.WebControls; using System.Web.UI.WebControls;
@ -67,6 +68,12 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
set { ViewState["DistributionListsEnabled"] = value; } set { ViewState["DistributionListsEnabled"] = value; }
} }
public bool SecurityGroupsEnabled
{
get { return ViewState["SecurityGroupsEnabled"] != null ? (bool)ViewState["SecurityGroupsEnabled"] : false; }
set { ViewState["SecurityGroupsEnabled"] = value; }
}
public int ExcludeAccountId public int ExcludeAccountId
{ {
get { return PanelRequest.AccountID; } get { return PanelRequest.AccountID; }
@ -89,6 +96,21 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
return accountNames.ToArray(); return accountNames.ToArray();
} }
public IDictionary<string, ExchangeAccountType> GetFullAccounts()
{
// get selected accounts
List<ExchangeAccount> selectedAccounts = GetGridViewAccounts(gvAccounts, SelectedState.All);
IDictionary<string, ExchangeAccountType> accounts = new Dictionary<string, ExchangeAccountType>();
foreach (ExchangeAccount account in selectedAccounts)
{
accounts.Add(account.AccountName, account.AccountType);
}
return accounts;
}
protected void Page_Load(object sender, EventArgs e) protected void Page_Load(object sender, EventArgs e)
{ {
// toggle controls // toggle controls
@ -109,6 +131,11 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
chkIncludeContacts.Checked = ContactsEnabled; chkIncludeContacts.Checked = ContactsEnabled;
chkIncludeLists.Visible = DistributionListsEnabled; chkIncludeLists.Visible = DistributionListsEnabled;
chkIncludeLists.Checked = DistributionListsEnabled; chkIncludeLists.Checked = DistributionListsEnabled;
chkIncludeGroups.Visible = SecurityGroupsEnabled;
chkIncludeGroups.Checked = SecurityGroupsEnabled;
gvAccounts.Columns[3].Visible = gvPopupAccounts.Columns[3].Visible = SecurityGroupsEnabled;
} }
// register javascript // register javascript
@ -133,7 +160,9 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
string imgName = "mailbox_16.gif"; string imgName = "mailbox_16.gif";
if (accountType == ExchangeAccountType.Contact) if (accountType == ExchangeAccountType.Contact)
imgName = "contact_16.gif"; imgName = "contact_16.gif";
else if (accountType == ExchangeAccountType.DistributionList) else if (accountType == ExchangeAccountType.DistributionList
|| accountType == ExchangeAccountType.SecurityGroup
|| accountType == ExchangeAccountType.DefaultSecurityGroup)
imgName = "dlist_16.gif"; imgName = "dlist_16.gif";
else if (accountType == ExchangeAccountType.Room) else if (accountType == ExchangeAccountType.Room)
imgName = "room_16.gif"; imgName = "room_16.gif";
@ -143,6 +172,23 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
return GetThemedImage("Exchange/" + imgName); return GetThemedImage("Exchange/" + imgName);
} }
public string GetType(int accountTypeId)
{
ExchangeAccountType accountType = (ExchangeAccountType)accountTypeId;
switch(accountType)
{
case ExchangeAccountType.DistributionList:
return "Distribution";
case ExchangeAccountType.SecurityGroup:
return "Security";
case ExchangeAccountType.DefaultSecurityGroup:
return "Default";
default:
return string.Empty;
}
}
protected void btnAdd_Click(object sender, EventArgs e) protected void btnAdd_Click(object sender, EventArgs e)
{ {
// bind all accounts // bind all accounts
@ -174,9 +220,14 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
{ {
ExchangeAccount[] accounts = ES.Services.ExchangeServer.SearchAccounts(PanelRequest.ItemID, ExchangeAccount[] accounts = ES.Services.ExchangeServer.SearchAccounts(PanelRequest.ItemID,
chkIncludeMailboxes.Checked, chkIncludeContacts.Checked, chkIncludeLists.Checked, chkIncludeMailboxes.Checked, chkIncludeContacts.Checked, chkIncludeLists.Checked,
chkIncludeRooms.Checked, chkIncludeEquipment.Checked, chkIncludeRooms.Checked, chkIncludeEquipment.Checked, chkIncludeGroups.Checked,
ddlSearchColumn.SelectedValue, txtSearchValue.Text + "%", ""); ddlSearchColumn.SelectedValue, txtSearchValue.Text + "%", "");
if (SecurityGroupsEnabled)
{
accounts = accounts.Where(x => !GetAccounts().Contains(x.AccountName)).ToArray();
}
if (ExcludeAccountId > 0) if (ExcludeAccountId > 0)
{ {
List<ExchangeAccount> updatedAccounts = new List<ExchangeAccount>(); List<ExchangeAccount> updatedAccounts = new List<ExchangeAccount>();
@ -189,6 +240,11 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
gvPopupAccounts.DataSource = accounts; gvPopupAccounts.DataSource = accounts;
gvPopupAccounts.DataBind(); gvPopupAccounts.DataBind();
if (gvPopupAccounts.Rows.Count > 0)
{
UpdateGridViewAccounts(gvPopupAccounts);
}
} }
private void BindAccounts(ExchangeAccount[] newAccounts, bool preserveExisting) private void BindAccounts(ExchangeAccount[] newAccounts, bool preserveExisting)
@ -224,6 +280,11 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
gvAccounts.DataSource = accounts; gvAccounts.DataSource = accounts;
gvAccounts.DataBind(); gvAccounts.DataBind();
if (gvAccounts.Rows.Count > 0)
{
UpdateGridViewAccounts(gvAccounts);
}
btnDelete.Visible = gvAccounts.Rows.Count > 0; btnDelete.Visible = gvAccounts.Rows.Count > 0;
} }
@ -251,6 +312,38 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
return accounts; return accounts;
} }
private void UpdateGridViewAccounts(GridView gv)
{
CheckBox chkSelectAll = (CheckBox)gv.HeaderRow.FindControl("chkSelectAll");
for (int i = 0; i < gv.Rows.Count; i++)
{
GridViewRow row = gv.Rows[i];
CheckBox chkSelect = (CheckBox)row.FindControl("chkSelect");
if (chkSelect == null)
{
continue;
}
ExchangeAccountType exAccountType = (ExchangeAccountType)Enum.Parse(typeof(ExchangeAccountType), ((Literal)row.FindControl("litAccountType")).Text);
if (exAccountType != ExchangeAccountType.DefaultSecurityGroup)
{
chkSelectAll = null;
chkSelect.Enabled = true;
}
else
{
chkSelect.Enabled = false;
}
}
if (chkSelectAll != null)
{
chkSelectAll.Enabled = false;
}
}
protected void chkIncludeMailboxes_CheckedChanged(object sender, EventArgs e) protected void chkIncludeMailboxes_CheckedChanged(object sender, EventArgs e)
{ {
BindPopupAccounts(); BindPopupAccounts();

View file

@ -1,7 +1,34 @@
// Copyright (c) 2012, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
// Runtime Version:2.0.50727.832
// //
// Changes to this file may cause incorrect behavior and will be lost if // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.
@ -11,12 +38,6 @@
namespace WebsitePanel.Portal.ExchangeServer.UserControls { namespace WebsitePanel.Portal.ExchangeServer.UserControls {
/// <summary>
/// AccountsList class.
/// </summary>
/// <remarks>
/// Auto-generated class.
/// </remarks>
public partial class AccountsList { public partial class AccountsList {
/// <summary> /// <summary>
@ -136,6 +157,15 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls {
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.CheckBox chkIncludeLists; protected global::System.Web.UI.WebControls.CheckBox chkIncludeLists;
/// <summary>
/// chkIncludeGroups control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox chkIncludeGroups;
/// <summary> /// <summary>
/// SearchPanel control. /// SearchPanel control.
/// </summary> /// </summary>

View file

@ -184,7 +184,7 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
{ {
ExchangeAccount[] accounts = ES.Services.ExchangeServer.SearchAccounts(PanelRequest.ItemID, ExchangeAccount[] accounts = ES.Services.ExchangeServer.SearchAccounts(PanelRequest.ItemID,
chkIncludeMailboxes.Checked, chkIncludeContacts.Checked, chkIncludeLists.Checked, chkIncludeMailboxes.Checked, chkIncludeContacts.Checked, chkIncludeLists.Checked,
chkIncludeRooms.Checked, chkIncludeEquipment.Checked, chkIncludeRooms.Checked, chkIncludeEquipment.Checked, false,
ddlSearchColumn.SelectedValue, txtSearchValue.Text + "%", ""); ddlSearchColumn.SelectedValue, txtSearchValue.Text + "%", "");
if (ExcludeAccountId > 0) if (ExcludeAccountId > 0)

View file

@ -112,10 +112,10 @@
<value>2.0</value> <value>2.0</value>
</resheader> </resheader>
<resheader name="reader"> <resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<data name="btnAdd.Text" xml:space="preserve"> <data name="btnAdd.Text" xml:space="preserve">
<value>Add...</value> <value>Add...</value>
@ -135,6 +135,9 @@
<data name="chkIncludeEquipment.Text" xml:space="preserve"> <data name="chkIncludeEquipment.Text" xml:space="preserve">
<value>Equipment</value> <value>Equipment</value>
</data> </data>
<data name="chkIncludeGroups" xml:space="preserve">
<value>Groups</value>
</data>
<data name="chkIncludeLists.Text" xml:space="preserve"> <data name="chkIncludeLists.Text" xml:space="preserve">
<value>Distribution Lists</value> <value>Distribution Lists</value>
</data> </data>
@ -153,6 +156,9 @@
<data name="gvAccounts.EmptyDataText" xml:space="preserve"> <data name="gvAccounts.EmptyDataText" xml:space="preserve">
<value>The list of accounts is empty. Click "Add..." button to add accounts.</value> <value>The list of accounts is empty. Click "Add..." button to add accounts.</value>
</data> </data>
<data name="gvAccountsAccountType.HeaderText" xml:space="preserve">
<value>Type</value>
</data>
<data name="gvAccountsDisplayName.HeaderText" xml:space="preserve"> <data name="gvAccountsDisplayName.HeaderText" xml:space="preserve">
<value>Display Name</value> <value>Display Name</value>
</data> </data>

View file

@ -153,6 +153,9 @@
<data name="gvAccounts.EmptyDataText" xml:space="preserve"> <data name="gvAccounts.EmptyDataText" xml:space="preserve">
<value>The list of accounts is empty. Click "Add..." button to add accounts.</value> <value>The list of accounts is empty. Click "Add..." button to add accounts.</value>
</data> </data>
<data name="gvAccountsAccountType.HeaderText" xml:space="preserve">
<value>Type</value>
</data>
<data name="gvAccountsDisplayName.HeaderText" xml:space="preserve"> <data name="gvAccountsDisplayName.HeaderText" xml:space="preserve">
<value>Display Name</value> <value>Display Name</value>
</data> </data>
@ -163,7 +166,7 @@
<value>No accounts found.</value> <value>No accounts found.</value>
</data> </data>
<data name="headerAddAccounts.Text" xml:space="preserve"> <data name="headerAddAccounts.Text" xml:space="preserve">
<value>Organization Users</value> <value>Organization Accounts</value>
</data> </data>
<data name="locIncludeSearch.Text" xml:space="preserve"> <data name="locIncludeSearch.Text" xml:space="preserve">
<value>Include in search:</value> <value>Include in search:</value>

View file

@ -116,8 +116,8 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
private void BindPopupAccounts() private void BindPopupAccounts()
{ {
ExchangeAccount[] accounts = ES.Services.Organizations.SearchSecurityGroups(PanelRequest.ItemID, ExchangeAccount[] accounts = ES.Services.Organizations.SearchOrganizationAccounts(PanelRequest.ItemID,
ddlSearchColumn.SelectedValue, txtSearchValue.Text + "%", ""); ddlSearchColumn.SelectedValue, txtSearchValue.Text + "%", "", true);
accounts = accounts.Where(x => !GetAccounts().Contains(x.AccountName)).ToArray(); accounts = accounts.Where(x => !GetAccounts().Contains(x.AccountName)).ToArray();
@ -158,6 +158,8 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
gvGroups.DataSource = accounts; gvGroups.DataSource = accounts;
gvGroups.DataBind(); gvGroups.DataBind();
UpdateGridViewAccounts(gvGroups);
btnDelete.Visible = gvGroups.Rows.Count > 0; btnDelete.Visible = gvGroups.Rows.Count > 0;
} }
@ -184,6 +186,38 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
return accounts; return accounts;
} }
private void UpdateGridViewAccounts(GridView gv)
{
CheckBox chkSelectAll = (CheckBox)gv.HeaderRow.FindControl("chkSelectAll");
for (int i = 0; i < gv.Rows.Count; i++)
{
GridViewRow row = gv.Rows[i];
CheckBox chkSelect = (CheckBox)row.FindControl("chkSelect");
if (chkSelect == null)
{
continue;
}
ExchangeAccountType exAccountType = (ExchangeAccountType)Enum.Parse(typeof(ExchangeAccountType), ((Literal)row.FindControl("litAccountType")).Text);
if (exAccountType != ExchangeAccountType.DefaultSecurityGroup)
{
chkSelectAll = null;
chkSelect.Enabled = true;
}
else
{
chkSelect.Enabled = false;
}
}
if (chkSelectAll != null)
{
chkSelectAll.Enabled = false;
}
}
protected void chkIncludeMailboxes_CheckedChanged(object sender, EventArgs e) protected void chkIncludeMailboxes_CheckedChanged(object sender, EventArgs e)
{ {
BindPopupAccounts(); BindPopupAccounts();

View file

@ -104,6 +104,10 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
chkIncludeLists.Visible = DistributionListsEnabled; chkIncludeLists.Visible = DistributionListsEnabled;
chkIncludeLists.Checked = DistributionListsEnabled; chkIncludeLists.Checked = DistributionListsEnabled;
} }
// increase timeout
ScriptManager scriptMngr = ScriptManager.GetCurrent(this.Page);
scriptMngr.AsyncPostBackTimeout = 300;
} }
private void BindSelectedAccount(ExchangeAccount account) private void BindSelectedAccount(ExchangeAccount account)
@ -157,7 +161,7 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
{ {
ExchangeAccount[] accounts = ES.Services.ExchangeServer.SearchAccounts(PanelRequest.ItemID, ExchangeAccount[] accounts = ES.Services.ExchangeServer.SearchAccounts(PanelRequest.ItemID,
chkIncludeMailboxes.Checked, chkIncludeContacts.Checked, chkIncludeLists.Checked, chkIncludeMailboxes.Checked, chkIncludeContacts.Checked, chkIncludeLists.Checked,
chkIncludeRooms.Checked, chkIncludeEquipment.Checked, chkIncludeRooms.Checked, chkIncludeEquipment.Checked, false,
ddlSearchColumn.SelectedValue, txtSearchValue.Text + "%", ""); ddlSearchColumn.SelectedValue, txtSearchValue.Text + "%", "");
if (ExcludeAccountId > 0) if (ExcludeAccountId > 0)

View file

@ -44,6 +44,13 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
set { selectedTab = value; } set { selectedTab = value; }
} }
private bool isDefault = false;
public bool IsDefault
{
get { return isDefault; }
set { isDefault = value; }
}
protected void Page_Load(object sender, EventArgs e) protected void Page_Load(object sender, EventArgs e)
{ {
BindTabs(); BindTabs();
@ -53,6 +60,10 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
{ {
List<Tab> tabsList = new List<Tab>(); List<Tab> tabsList = new List<Tab>();
tabsList.Add(CreateTab("secur_group_settings", "Tab.Settings")); tabsList.Add(CreateTab("secur_group_settings", "Tab.Settings"));
if (!isDefault)
{
tabsList.Add(CreateTab("secur_group_memberof", "Tab.MemberOf"));
}
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId); PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);

View file

@ -151,7 +151,9 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
protected void Page_Load(object sender, EventArgs e) protected void Page_Load(object sender, EventArgs e)
{ {
// increase timeout
ScriptManager scriptMngr = ScriptManager.GetCurrent(this.Page);
scriptMngr.AsyncPostBackTimeout = 300;
} }
private void BindSelectedAccount(OrganizationUser account) private void BindSelectedAccount(OrganizationUser account)
@ -288,6 +290,8 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
if (e.CommandName == "SelectAccount") if (e.CommandName == "SelectAccount")
{ {
string[] parts = e.CommandArgument.ToString().Split('|'); string[] parts = e.CommandArgument.ToString().Split('|');
/*
OrganizationUser account = new OrganizationUser(); OrganizationUser account = new OrganizationUser();
account.AccountName = parts[0]; account.AccountName = parts[0];
account.DisplayName = parts[1]; account.DisplayName = parts[1];
@ -295,6 +299,11 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
account.AccountId = Utils.ParseInt(parts[3]); account.AccountId = Utils.ParseInt(parts[3]);
account.SamAccountName = parts[4]; account.SamAccountName = parts[4];
account.SubscriberNumber = parts[5]; account.SubscriberNumber = parts[5];
*/
int AccountId = Utils.ParseInt(parts[3]);
OrganizationUser account = ES.Services.Organizations.GetUserGeneralSettings(PanelRequest.ItemID, AccountId);
// set account // set account
BindSelectedAccount(account); BindSelectedAccount(account);

View file

@ -23,7 +23,7 @@
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField meta:resourcekey="gvAccountsDisplayName" HeaderText="gvAccountsDisplayName"> <asp:TemplateField meta:resourcekey="gvAccountsDisplayName" HeaderText="gvAccountsDisplayName">
<HeaderStyle Wrap="false" /> <HeaderStyle Wrap="false" />
<ItemStyle Width="50%" Wrap="false"></ItemStyle> <ItemStyle Width="34%" Wrap="false"></ItemStyle>
<ItemTemplate> <ItemTemplate>
<asp:Image ID="img1" runat="server" ImageUrl='<%# GetAccountImage((int)Eval("AccountType")) %>' ImageAlign="AbsMiddle" /> <asp:Image ID="img1" runat="server" ImageUrl='<%# GetAccountImage((int)Eval("AccountType")) %>' ImageAlign="AbsMiddle" />
<asp:Literal ID="litDisplayName" runat="server" Text='<%# Eval("DisplayName") %>'></asp:Literal> <asp:Literal ID="litDisplayName" runat="server" Text='<%# Eval("DisplayName") %>'></asp:Literal>
@ -31,11 +31,18 @@
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField meta:resourcekey="gvAccountsEmail" HeaderText="gvAccountsEmail"> <asp:TemplateField meta:resourcekey="gvAccountsEmail" HeaderText="gvAccountsEmail">
<HeaderStyle Wrap="false" /> <HeaderStyle Wrap="false" />
<ItemStyle Width="50%" Wrap="false"></ItemStyle> <ItemStyle Width="33%" Wrap="false"></ItemStyle>
<ItemTemplate> <ItemTemplate>
<asp:Literal ID="litPrimaryEmailAddress" runat="server" Text='<%# Eval("PrimaryEmailAddress") %>'></asp:Literal> <asp:Literal ID="litPrimaryEmailAddress" runat="server" Text='<%# Eval("PrimaryEmailAddress") %>'></asp:Literal>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField meta:resourcekey="gvAccountsAccountType" HeaderText="gvAccountsAccountType">
<HeaderStyle Wrap="false" />
<ItemStyle Width="33%" Wrap="false"></ItemStyle>
<ItemTemplate>
<asp:Literal ID="litType" runat="server" Text='<%# GetType((int)Eval("AccountType")) %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
</Columns> </Columns>
</asp:GridView> </asp:GridView>
@ -83,18 +90,24 @@
<ItemStyle Width="10px" /> <ItemStyle Width="10px" />
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField meta:resourcekey="gvAccountsDisplayName"> <asp:TemplateField meta:resourcekey="gvAccountsDisplayName">
<ItemStyle Width="50%"></ItemStyle> <ItemStyle Width="34%"></ItemStyle>
<ItemTemplate> <ItemTemplate>
<asp:Image ID="img1" runat="server" ImageUrl='<%# GetAccountImage((int)Eval("AccountType")) %>' ImageAlign="AbsMiddle" /> <asp:Image ID="img1" runat="server" ImageUrl='<%# GetAccountImage((int)Eval("AccountType")) %>' ImageAlign="AbsMiddle" />
<asp:Literal ID="litDisplayName" runat="server" Text='<%# Eval("DisplayName") %>'></asp:Literal> <asp:Literal ID="litDisplayName" runat="server" Text='<%# Eval("DisplayName") %>'></asp:Literal>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField meta:resourcekey="gvAccountsEmail"> <asp:TemplateField meta:resourcekey="gvAccountsEmail">
<ItemStyle Width="50%"></ItemStyle> <ItemStyle Width="33%"></ItemStyle>
<ItemTemplate> <ItemTemplate>
<asp:Literal ID="litPrimaryEmailAddress" runat="server" Text='<%# Eval("PrimaryEmailAddress") %>'></asp:Literal> <asp:Literal ID="litPrimaryEmailAddress" runat="server" Text='<%# Eval("PrimaryEmailAddress") %>'></asp:Literal>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField meta:resourcekey="gvAccountsAccountType" HeaderText="gvAccountsAccountType">
<ItemStyle Width="33%"></ItemStyle>
<ItemTemplate>
<asp:Literal ID="litType" runat="server" Text='<%# GetType((int)Eval("AccountType")) %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
</Columns> </Columns>
</asp:GridView> </asp:GridView>
</div> </div>

View file

@ -54,79 +54,12 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
Unselected Unselected
} }
public bool IncludeMailboxes
{
get
{
object ret = ViewState["IncludeMailboxes"];
return (ret != null) ? (bool)ret : false;
}
set
{
ViewState["IncludeMailboxes"] = value;
}
}
public bool IncludeMailboxesOnly
{
get
{
object ret = ViewState["IncludeMailboxesOnly"];
return (ret != null) ? (bool)ret : false;
}
set
{
ViewState["IncludeMailboxesOnly"] = value;
}
}
public bool ExcludeOCSUsers
{
get
{
object ret = ViewState["ExcludeOCSUsers"];
return (ret != null) ? (bool)ret : false;
}
set
{
ViewState["ExcludeOCSUsers"] = value;
}
}
public bool ExcludeLyncUsers
{
get
{
object ret = ViewState["ExcludeLyncUsers"];
return (ret != null) ? (bool)ret : false;
}
set
{
ViewState["ExcludeLyncUsers"] = value;
}
}
public bool ExcludeBESUsers
{
get
{
object ret = ViewState["ExcludeBESUsers"];
return (ret != null) ? (bool)ret : false;
}
set
{
ViewState["ExcludeBESUsers"] = value;
}
}
public int ExcludeAccountId public int ExcludeAccountId
{ {
get { return PanelRequest.AccountID; } get { return PanelRequest.AccountID; }
} }
public void SetAccounts(OrganizationUser[] accounts) public void SetAccounts(ExchangeAccount[] accounts)
{ {
BindAccounts(accounts, false); BindAccounts(accounts, false);
} }
@ -134,10 +67,10 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
public string[] GetAccounts() public string[] GetAccounts()
{ {
// get selected accounts // get selected accounts
List<OrganizationUser> selectedAccounts = GetGridViewAccounts(gvAccounts, SelectedState.All); List<ExchangeAccount> selectedAccounts = GetGridViewAccounts(gvAccounts, SelectedState.All);
List<string> accountNames = new List<string>(); List<string> accountNames = new List<string>();
foreach (OrganizationUser account in selectedAccounts) foreach (ExchangeAccount account in selectedAccounts)
accountNames.Add(account.AccountName); accountNames.Add(account.AccountName);
return accountNames.ToArray(); return accountNames.ToArray();
@ -178,7 +111,7 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
protected void btnDelete_Click(object sender, EventArgs e) protected void btnDelete_Click(object sender, EventArgs e)
{ {
// get selected accounts // get selected accounts
List<OrganizationUser> selectedAccounts = GetGridViewAccounts(gvAccounts, SelectedState.Unselected); List<ExchangeAccount> selectedAccounts = GetGridViewAccounts(gvAccounts, SelectedState.Unselected);
// add to the main list // add to the main list
BindAccounts(selectedAccounts.ToArray(), false); BindAccounts(selectedAccounts.ToArray(), false);
@ -187,7 +120,7 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
protected void btnAddSelected_Click(object sender, EventArgs e) protected void btnAddSelected_Click(object sender, EventArgs e)
{ {
// get selected accounts // get selected accounts
List<OrganizationUser> selectedAccounts = GetGridViewAccounts(gvPopupAccounts, SelectedState.Selected); List<ExchangeAccount> selectedAccounts = GetGridViewAccounts(gvPopupAccounts, SelectedState.Selected);
// add to the main list // add to the main list
BindAccounts(selectedAccounts.ToArray(), true); BindAccounts(selectedAccounts.ToArray(), true);
@ -206,6 +139,15 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
case ExchangeAccountType.Equipment: case ExchangeAccountType.Equipment:
imgName = "equipment_16.gif"; imgName = "equipment_16.gif";
break; break;
case ExchangeAccountType.DistributionList:
imgName = "dlist_16.gif";
break;
case ExchangeAccountType.SecurityGroup:
imgName = "dlist_16.gif";
break;
case ExchangeAccountType.DefaultSecurityGroup:
imgName = "dlist_16.gif";
break;
default: default:
imgName = "admin_16.png"; imgName = "admin_16.png";
break; break;
@ -214,60 +156,42 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
return GetThemedImage("Exchange/" + imgName); return GetThemedImage("Exchange/" + imgName);
} }
public string GetType(int accountTypeId)
{
ExchangeAccountType accountType = (ExchangeAccountType)accountTypeId;
switch (accountType)
{
case ExchangeAccountType.DistributionList:
return "Distribution";
case ExchangeAccountType.SecurityGroup:
return "Security";
case ExchangeAccountType.DefaultSecurityGroup:
return "Default Group";
default:
return accountType.ToString();
}
}
private void BindPopupAccounts() private void BindPopupAccounts()
{ {
OrganizationUser[] accounts = ES.Services.Organizations.SearchAccounts(PanelRequest.ItemID, ExchangeAccount[] accounts = ES.Services.Organizations.SearchOrganizationAccounts(PanelRequest.ItemID,
ddlSearchColumn.SelectedValue, txtSearchValue.Text + "%", "", IncludeMailboxes); ddlSearchColumn.SelectedValue, txtSearchValue.Text + "%", "", false);
List<OrganizationUser> newAccounts = new List<OrganizationUser>(); List<ExchangeAccount> newAccounts = new List<ExchangeAccount>();
accounts = accounts.Where(x => !GetAccounts().Contains(x.AccountName)).ToArray(); accounts = accounts.Where(x => !GetAccounts().Contains(x.AccountName)).ToArray();
if (ExcludeAccountId > 0) if (ExcludeAccountId > 0)
{ {
List<OrganizationUser> updatedAccounts = new List<OrganizationUser>(); List<ExchangeAccount> updatedAccounts = new List<ExchangeAccount>();
foreach (OrganizationUser account in accounts) foreach (ExchangeAccount account in accounts)
if (account.AccountId != ExcludeAccountId) if (account.AccountId != ExcludeAccountId)
updatedAccounts.Add(account); updatedAccounts.Add(account);
accounts = updatedAccounts.ToArray(); accounts = updatedAccounts.ToArray();
} }
if (IncludeMailboxesOnly)
{
List<OrganizationUser> updatedAccounts = new List<OrganizationUser>();
foreach (OrganizationUser account in accounts)
{
bool addUser = false;
if (account.ExternalEmail != string.Empty) addUser = true;
if ((account.IsBlackBerryUser) & (ExcludeBESUsers)) addUser = false;
if ((account.IsLyncUser) & (ExcludeLyncUsers)) addUser = false;
if (addUser) updatedAccounts.Add(account);
}
accounts = updatedAccounts.ToArray();
}
else
if ((ExcludeOCSUsers) | (ExcludeBESUsers) | (ExcludeLyncUsers))
{
List<OrganizationUser> updatedAccounts = new List<OrganizationUser>();
foreach (OrganizationUser account in accounts)
{
bool addUser = true;
if ((account.IsOCSUser) & (ExcludeOCSUsers)) addUser = false;
if ((account.IsLyncUser) & (ExcludeLyncUsers)) addUser = false;
if ((account.IsBlackBerryUser) & (ExcludeBESUsers)) addUser = false;
if (addUser) updatedAccounts.Add(account);
}
accounts = updatedAccounts.ToArray();
}
Array.Sort(accounts, CompareAccount); Array.Sort(accounts, CompareAccount);
if (Direction == SortDirection.Ascending) if (Direction == SortDirection.Ascending)
{ {
@ -281,21 +205,21 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
gvPopupAccounts.DataBind(); gvPopupAccounts.DataBind();
} }
private void BindAccounts(OrganizationUser[] newAccounts, bool preserveExisting) private void BindAccounts(ExchangeAccount[] newAccounts, bool preserveExisting)
{ {
// get binded addresses // get binded addresses
List<OrganizationUser> accounts = new List<OrganizationUser>(); List<ExchangeAccount> accounts = new List<ExchangeAccount>();
if(preserveExisting) if(preserveExisting)
accounts.AddRange(GetGridViewAccounts(gvAccounts, SelectedState.All)); accounts.AddRange(GetGridViewAccounts(gvAccounts, SelectedState.All));
// add new accounts // add new accounts
if (newAccounts != null) if (newAccounts != null)
{ {
foreach (OrganizationUser newAccount in newAccounts) foreach (ExchangeAccount newAccount in newAccounts)
{ {
// check if exists // check if exists
bool exists = false; bool exists = false;
foreach (OrganizationUser account in accounts) foreach (ExchangeAccount account in accounts)
{ {
if (String.Compare(newAccount.AccountName, account.AccountName, true) == 0) if (String.Compare(newAccount.AccountName, account.AccountName, true) == 0)
{ {
@ -317,9 +241,9 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
btnDelete.Visible = gvAccounts.Rows.Count > 0; btnDelete.Visible = gvAccounts.Rows.Count > 0;
} }
private List<OrganizationUser> GetGridViewAccounts(GridView gv, SelectedState state) private List<ExchangeAccount> GetGridViewAccounts(GridView gv, SelectedState state)
{ {
List<OrganizationUser> accounts = new List<OrganizationUser>(); List<ExchangeAccount> accounts = new List<ExchangeAccount>();
for (int i = 0; i < gv.Rows.Count; i++) for (int i = 0; i < gv.Rows.Count; i++)
{ {
GridViewRow row = gv.Rows[i]; GridViewRow row = gv.Rows[i];
@ -327,7 +251,7 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
if (chkSelect == null) if (chkSelect == null)
continue; continue;
OrganizationUser account = new OrganizationUser(); ExchangeAccount account = new ExchangeAccount();
account.AccountType = (ExchangeAccountType)Enum.Parse(typeof(ExchangeAccountType), ((Literal)row.FindControl("litAccountType")).Text); account.AccountType = (ExchangeAccountType)Enum.Parse(typeof(ExchangeAccountType), ((Literal)row.FindControl("litAccountType")).Text);
account.AccountName = (string)gv.DataKeys[i][0]; account.AccountName = (string)gv.DataKeys[i][0];
account.DisplayName = ((Literal)row.FindControl("litDisplayName")).Text; account.DisplayName = ((Literal)row.FindControl("litDisplayName")).Text;
@ -352,7 +276,7 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
set { ViewState[DirectionString] = value; } set { ViewState[DirectionString] = value; }
} }
private static int CompareAccount(OrganizationUser user1, OrganizationUser user2) private static int CompareAccount(ExchangeAccount user1, ExchangeAccount user2)
{ {
return string.Compare(user1.DisplayName, user2.DisplayName); return string.Compare(user1.DisplayName, user2.DisplayName);
} }

View file

@ -90,11 +90,6 @@
<asp:CheckBox ID="chkRemoteUserAccess" runat="server" meta:resourcekey="chkRemoteUserAccess" Text="Remote User access"></asp:CheckBox> <asp:CheckBox ID="chkRemoteUserAccess" runat="server" meta:resourcekey="chkRemoteUserAccess" Text="Remote User access"></asp:CheckBox>
</td> </td>
</tr> </tr>
<tr>
<td>
<asp:CheckBox ID="chkPublicIMConnectivity" runat="server" meta:resourcekey="chkPublicIMConnectivity" Text="Public IM Connectivity"></asp:CheckBox>
</td>
</tr>
</table> </table>
<br /> <br />
</asp:Panel> </asp:Panel>

View file

@ -42,12 +42,10 @@ namespace WebsitePanel.Portal.Lync
{ {
protected void Page_Load(object sender, EventArgs e) protected void Page_Load(object sender, EventArgs e)
{ {
PackageContext cntx = null; PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
if (!IsPostBack) if (!IsPostBack)
{ {
cntx = ES.Services.Packages.GetPackageContext(PanelSecurity.PackageId);
string[] archivePolicy = ES.Services.Lync.GetPolicyList(PanelRequest.ItemID, LyncPolicyType.Archiving, null); string[] archivePolicy = ES.Services.Lync.GetPolicyList(PanelRequest.ItemID, LyncPolicyType.Archiving, null);
if (archivePolicy != null) if (archivePolicy != null)
{ {
@ -95,23 +93,15 @@ namespace WebsitePanel.Portal.Lync
*/ */
chkRemoteUserAccess.Checked = plan.RemoteUserAccess; chkRemoteUserAccess.Checked = plan.RemoteUserAccess;
chkPublicIMConnectivity.Checked = plan.PublicIMConnectivity;
chkAllowOrganizeMeetingsWithExternalAnonymous.Checked = plan.AllowOrganizeMeetingsWithExternalAnonymous; chkAllowOrganizeMeetingsWithExternalAnonymous.Checked = plan.AllowOrganizeMeetingsWithExternalAnonymous;
ddTelephony.SelectedIndex = plan.Telephony; Utils.SelectListItem(ddTelephony, plan.Telephony);
tbServerURI.Text = plan.ServerURI; tbServerURI.Text = plan.ServerURI;
locTitle.Text = plan.LyncUserPlanName; string planArchivePolicy = ""; if (plan.ArchivePolicy != null) planArchivePolicy = plan.ArchivePolicy;
this.DisableControls = true; string planTelephonyDialPlanPolicy = ""; if (plan.TelephonyDialPlanPolicy != null) planTelephonyDialPlanPolicy = plan.TelephonyDialPlanPolicy;
string planTelephonyVoicePolicy = ""; if (plan.TelephonyVoicePolicy != null) planTelephonyVoicePolicy = plan.TelephonyVoicePolicy;
string planArchivePolicy = "";
if (plan.ArchivePolicy != null) planArchivePolicy = plan.ArchivePolicy;
string planTelephonyDialPlanPolicy = "";
if (plan.TelephonyDialPlanPolicy != null) planTelephonyDialPlanPolicy = plan.TelephonyDialPlanPolicy;
string planTelephonyVoicePolicy = "";
if (plan.TelephonyVoicePolicy != null) planTelephonyVoicePolicy = plan.TelephonyVoicePolicy;
ddArchivingPolicy.Items.Clear(); ddArchivingPolicy.Items.Clear();
ddArchivingPolicy.Items.Add(new System.Web.UI.WebControls.ListItem(planArchivePolicy.Replace("Tag:", ""), planArchivePolicy)); ddArchivingPolicy.Items.Add(new System.Web.UI.WebControls.ListItem(planArchivePolicy.Replace("Tag:", ""), planArchivePolicy));
@ -120,12 +110,16 @@ namespace WebsitePanel.Portal.Lync
ddTelephonyVoicePolicy.Items.Clear(); ddTelephonyVoicePolicy.Items.Clear();
ddTelephonyVoicePolicy.Items.Add(new System.Web.UI.WebControls.ListItem(planTelephonyVoicePolicy.Replace("Tag:", ""), planTelephonyVoicePolicy)); ddTelephonyVoicePolicy.Items.Add(new System.Web.UI.WebControls.ListItem(planTelephonyVoicePolicy.Replace("Tag:", ""), planTelephonyVoicePolicy));
locTitle.Text = plan.LyncUserPlanName;
this.DisableControls = true;
} }
else else
{ {
chkIM.Checked = true; chkIM.Checked = true;
chkIM.Enabled = false; chkIM.Enabled = false;
// chkNone.Checked = true; because not used // chkNone.Checked = true; because not used
if (cntx != null) if (cntx != null)
{ {
foreach (QuotaValueInfo quota in cntx.QuotasArray) foreach (QuotaValueInfo quota in cntx.QuotasArray)
@ -140,10 +134,6 @@ namespace WebsitePanel.Portal.Lync
chkConferencing.Checked = Convert.ToBoolean(quota.QuotaAllocatedValue); chkConferencing.Checked = Convert.ToBoolean(quota.QuotaAllocatedValue);
chkConferencing.Enabled = Convert.ToBoolean(quota.QuotaAllocatedValue); chkConferencing.Enabled = Convert.ToBoolean(quota.QuotaAllocatedValue);
break; break;
case 375:
chkEnterpriseVoice.Checked = Convert.ToBoolean(quota.QuotaAllocatedValue);
chkEnterpriseVoice.Enabled = Convert.ToBoolean(quota.QuotaAllocatedValue);
break;
} }
} }
} }
@ -152,32 +142,29 @@ namespace WebsitePanel.Portal.Lync
} }
} }
bool enterpriseVoiceQuota = Utils.CheckQouta(Quotas.LYNC_ENTERPRISEVOICE, cntx);
PlanFeaturesTelephony.Visible = enterpriseVoiceQuota;
secPlanFeaturesTelephony.Visible = enterpriseVoiceQuota;
if (!enterpriseVoiceQuota) Utils.SelectListItem(ddTelephony, "0");
bool enterpriseVoice = enterpriseVoiceQuota && (ddTelephony.SelectedValue == "2");
chkEnterpriseVoice.Enabled = false; chkEnterpriseVoice.Enabled = false;
chkEnterpriseVoice.Checked = false; chkEnterpriseVoice.Checked = enterpriseVoice;
pnEnterpriseVoice.Visible = enterpriseVoice;
pnEnterpriseVoice.Visible = false; switch (ddTelephony.SelectedValue)
pnServerURI.Visible = false;
switch (ddTelephony.SelectedIndex)
{ {
case 1: case "3":
break; case "4":
case 2:
pnEnterpriseVoice.Visible = true;
chkEnterpriseVoice.Checked = true;
break;
case 3:
pnServerURI.Visible = true; pnServerURI.Visible = true;
break; break;
case 4: default:
pnServerURI.Visible = true; pnServerURI.Visible = false;
break; break;
} }
cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
PlanFeaturesTelephony.Visible = Utils.CheckQouta(Quotas.LYNC_ENTERPRISEVOICE, cntx);
secPlanFeaturesTelephony.Visible = PlanFeaturesTelephony.Visible;
} }
@ -221,6 +208,8 @@ namespace WebsitePanel.Portal.Lync
{ {
try try
{ {
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
Providers.HostedSolution.LyncUserPlan plan = new Providers.HostedSolution.LyncUserPlan(); Providers.HostedSolution.LyncUserPlan plan = new Providers.HostedSolution.LyncUserPlan();
plan.LyncUserPlanName = txtPlan.Text; plan.LyncUserPlanName = txtPlan.Text;
plan.IsDefault = false; plan.IsDefault = false;
@ -230,8 +219,10 @@ namespace WebsitePanel.Portal.Lync
plan.Federation = chkFederation.Checked; plan.Federation = chkFederation.Checked;
plan.Conferencing = chkConferencing.Checked; plan.Conferencing = chkConferencing.Checked;
bool enterpriseVoiceQuota = Utils.CheckQouta(Quotas.LYNC_ENTERPRISEVOICE, cntx);
bool enterpriseVoice = enterpriseVoiceQuota && (ddTelephony.SelectedValue == "2");
plan.EnterpriseVoice = chkEnterpriseVoice.Checked; plan.EnterpriseVoice = enterpriseVoice;
plan.VoicePolicy = LyncVoicePolicyType.None; plan.VoicePolicy = LyncVoicePolicyType.None;
@ -257,11 +248,12 @@ namespace WebsitePanel.Portal.Lync
*/ */
plan.RemoteUserAccess = chkRemoteUserAccess.Checked; plan.RemoteUserAccess = chkRemoteUserAccess.Checked;
plan.PublicIMConnectivity = chkPublicIMConnectivity.Checked;
plan.AllowOrganizeMeetingsWithExternalAnonymous = chkAllowOrganizeMeetingsWithExternalAnonymous.Checked; plan.AllowOrganizeMeetingsWithExternalAnonymous = chkAllowOrganizeMeetingsWithExternalAnonymous.Checked;
plan.Telephony = ddTelephony.SelectedIndex; int telephonyId = -1;
int.TryParse(ddTelephony.SelectedValue, out telephonyId);
plan.Telephony = telephonyId;
plan.ServerURI = tbServerURI.Text; plan.ServerURI = tbServerURI.Text;

View file

@ -29,11 +29,13 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
// Runtime Version:2.0.50727.3074
// //
// Changes to this file may cause incorrect behavior and will be lost if // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.
// </auto-generated> // </auto-generated>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace WebsitePanel.Portal.Lync { namespace WebsitePanel.Portal.Lync {
@ -45,6 +47,7 @@ namespace WebsitePanel.Portal.Lync {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks; protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks;
@ -54,6 +57,7 @@ namespace WebsitePanel.Portal.Lync {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Breadcrumb breadcrumb; protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Breadcrumb breadcrumb;
@ -63,6 +67,7 @@ namespace WebsitePanel.Portal.Lync {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Menu menu; protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Menu menu;
@ -72,6 +77,7 @@ namespace WebsitePanel.Portal.Lync {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Image Image1; protected global::System.Web.UI.WebControls.Image Image1;
@ -81,6 +87,7 @@ namespace WebsitePanel.Portal.Lync {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Localize locTitle; protected global::System.Web.UI.WebControls.Localize locTitle;
@ -90,6 +97,7 @@ namespace WebsitePanel.Portal.Lync {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox; protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
@ -99,6 +107,7 @@ namespace WebsitePanel.Portal.Lync {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secPlan; protected global::WebsitePanel.Portal.CollapsiblePanel secPlan;
@ -108,6 +117,7 @@ namespace WebsitePanel.Portal.Lync {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Panel Plan; protected global::System.Web.UI.WebControls.Panel Plan;
@ -117,6 +127,7 @@ namespace WebsitePanel.Portal.Lync {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtPlan; protected global::System.Web.UI.WebControls.TextBox txtPlan;
@ -126,6 +137,7 @@ namespace WebsitePanel.Portal.Lync {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.RequiredFieldValidator valRequirePlan; protected global::System.Web.UI.WebControls.RequiredFieldValidator valRequirePlan;
@ -135,6 +147,7 @@ namespace WebsitePanel.Portal.Lync {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secPlanFeatures; protected global::WebsitePanel.Portal.CollapsiblePanel secPlanFeatures;
@ -144,6 +157,7 @@ namespace WebsitePanel.Portal.Lync {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Panel PlanFeatures; protected global::System.Web.UI.WebControls.Panel PlanFeatures;
@ -153,6 +167,7 @@ namespace WebsitePanel.Portal.Lync {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.CheckBox chkIM; protected global::System.Web.UI.WebControls.CheckBox chkIM;
@ -162,6 +177,7 @@ namespace WebsitePanel.Portal.Lync {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.CheckBox chkMobility; protected global::System.Web.UI.WebControls.CheckBox chkMobility;
@ -171,6 +187,7 @@ namespace WebsitePanel.Portal.Lync {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.CheckBox chkConferencing; protected global::System.Web.UI.WebControls.CheckBox chkConferencing;
@ -180,6 +197,7 @@ namespace WebsitePanel.Portal.Lync {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.CheckBox chkEnterpriseVoice; protected global::System.Web.UI.WebControls.CheckBox chkEnterpriseVoice;
@ -189,6 +207,7 @@ namespace WebsitePanel.Portal.Lync {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secPlanFeaturesFederation; protected global::WebsitePanel.Portal.CollapsiblePanel secPlanFeaturesFederation;
@ -198,6 +217,7 @@ namespace WebsitePanel.Portal.Lync {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Panel PlanFeaturesFederation; protected global::System.Web.UI.WebControls.Panel PlanFeaturesFederation;
@ -207,6 +227,7 @@ namespace WebsitePanel.Portal.Lync {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.CheckBox chkFederation; protected global::System.Web.UI.WebControls.CheckBox chkFederation;
@ -216,24 +237,17 @@ namespace WebsitePanel.Portal.Lync {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.CheckBox chkRemoteUserAccess; protected global::System.Web.UI.WebControls.CheckBox chkRemoteUserAccess;
/// <summary>
/// chkPublicIMConnectivity control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox chkPublicIMConnectivity;
/// <summary> /// <summary>
/// secPlanFeaturesArchiving control. /// secPlanFeaturesArchiving control.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secPlanFeaturesArchiving; protected global::WebsitePanel.Portal.CollapsiblePanel secPlanFeaturesArchiving;
@ -243,6 +257,7 @@ namespace WebsitePanel.Portal.Lync {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Panel PlanFeaturesArchiving; protected global::System.Web.UI.WebControls.Panel PlanFeaturesArchiving;
@ -252,6 +267,7 @@ namespace WebsitePanel.Portal.Lync {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Localize locArchivingPolicy; protected global::System.Web.UI.WebControls.Localize locArchivingPolicy;
@ -261,6 +277,7 @@ namespace WebsitePanel.Portal.Lync {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.DropDownList ddArchivingPolicy; protected global::System.Web.UI.WebControls.DropDownList ddArchivingPolicy;
@ -270,6 +287,7 @@ namespace WebsitePanel.Portal.Lync {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secPlanFeaturesMeeting; protected global::WebsitePanel.Portal.CollapsiblePanel secPlanFeaturesMeeting;
@ -279,6 +297,7 @@ namespace WebsitePanel.Portal.Lync {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Panel PlanFeaturesMeeting; protected global::System.Web.UI.WebControls.Panel PlanFeaturesMeeting;
@ -288,6 +307,7 @@ namespace WebsitePanel.Portal.Lync {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.CheckBox chkAllowOrganizeMeetingsWithExternalAnonymous; protected global::System.Web.UI.WebControls.CheckBox chkAllowOrganizeMeetingsWithExternalAnonymous;
@ -297,6 +317,7 @@ namespace WebsitePanel.Portal.Lync {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secPlanFeaturesTelephony; protected global::WebsitePanel.Portal.CollapsiblePanel secPlanFeaturesTelephony;
@ -306,6 +327,7 @@ namespace WebsitePanel.Portal.Lync {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Panel PlanFeaturesTelephony; protected global::System.Web.UI.WebControls.Panel PlanFeaturesTelephony;
@ -315,6 +337,7 @@ namespace WebsitePanel.Portal.Lync {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Localize locTelephony; protected global::System.Web.UI.WebControls.Localize locTelephony;
@ -324,6 +347,7 @@ namespace WebsitePanel.Portal.Lync {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.DropDownList ddTelephony; protected global::System.Web.UI.WebControls.DropDownList ddTelephony;
@ -333,6 +357,7 @@ namespace WebsitePanel.Portal.Lync {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Panel pnEnterpriseVoice; protected global::System.Web.UI.WebControls.Panel pnEnterpriseVoice;
@ -342,6 +367,7 @@ namespace WebsitePanel.Portal.Lync {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Localize locTelephonyProvider; protected global::System.Web.UI.WebControls.Localize locTelephonyProvider;
@ -351,6 +377,7 @@ namespace WebsitePanel.Portal.Lync {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.TextBox tbTelephoneProvider; protected global::System.Web.UI.WebControls.TextBox tbTelephoneProvider;
@ -360,6 +387,7 @@ namespace WebsitePanel.Portal.Lync {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Button btnAccept; protected global::System.Web.UI.WebControls.Button btnAccept;
@ -369,6 +397,7 @@ namespace WebsitePanel.Portal.Lync {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.RequiredFieldValidator AcceptRequiredValidator; protected global::System.Web.UI.WebControls.RequiredFieldValidator AcceptRequiredValidator;
@ -378,6 +407,7 @@ namespace WebsitePanel.Portal.Lync {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Localize locDialPlan; protected global::System.Web.UI.WebControls.Localize locDialPlan;
@ -387,6 +417,7 @@ namespace WebsitePanel.Portal.Lync {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.DropDownList ddTelephonyDialPlanPolicy; protected global::System.Web.UI.WebControls.DropDownList ddTelephonyDialPlanPolicy;
@ -396,6 +427,7 @@ namespace WebsitePanel.Portal.Lync {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Localize locVoicePolicy; protected global::System.Web.UI.WebControls.Localize locVoicePolicy;
@ -405,6 +437,7 @@ namespace WebsitePanel.Portal.Lync {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.DropDownList ddTelephonyVoicePolicy; protected global::System.Web.UI.WebControls.DropDownList ddTelephonyVoicePolicy;
@ -414,6 +447,7 @@ namespace WebsitePanel.Portal.Lync {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Panel pnServerURI; protected global::System.Web.UI.WebControls.Panel pnServerURI;
@ -423,6 +457,7 @@ namespace WebsitePanel.Portal.Lync {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Localize locServerURI; protected global::System.Web.UI.WebControls.Localize locServerURI;
@ -432,6 +467,7 @@ namespace WebsitePanel.Portal.Lync {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.TextBox tbServerURI; protected global::System.Web.UI.WebControls.TextBox tbServerURI;
@ -441,6 +477,7 @@ namespace WebsitePanel.Portal.Lync {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Button btnAdd; protected global::System.Web.UI.WebControls.Button btnAdd;
@ -450,6 +487,7 @@ namespace WebsitePanel.Portal.Lync {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.ValidationSummary ValidationSummary1; protected global::System.Web.UI.WebControls.ValidationSummary ValidationSummary1;
} }

View file

@ -57,35 +57,42 @@ namespace WebsitePanel.Portal.Lync
private void BindPhoneNumbers() private void BindPhoneNumbers()
{ {
PackageIPAddress[] ips = ES.Services.Servers.GetPackageUnassignedIPAddresses(PanelSecurity.PackageId, IPAddressPool.PhoneNumbers);
if (ips.Length > 0)
{
ddlPhoneNumber.Items.Add(new ListItem("<Select Phone>", "")); ddlPhoneNumber.Items.Add(new ListItem("<Select Phone>", ""));
PackageIPAddress[] ips = ES.Services.Servers.GetPackageUnassignedIPAddresses(PanelSecurity.PackageId, IPAddressPool.PhoneNumbers);
foreach (PackageIPAddress ip in ips) foreach (PackageIPAddress ip in ips)
{ {
string phone = ip.ExternalIP; string phone = ip.ExternalIP;
ddlPhoneNumber.Items.Add(new ListItem(phone, ip.PackageAddressID.ToString())); ddlPhoneNumber.Items.Add(new ListItem(phone, ip.PackageAddressID.ToString()));
} }
}
} }
protected void Page_PreRender(object sender, EventArgs e) protected void Page_PreRender(object sender, EventArgs e)
{ {
bool EnterpriseVoice = false; PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
bool enterpriseVoiceQuota = Utils.CheckQouta(Quotas.LYNC_ENTERPRISEVOICE, cntx);
bool enterpriseVoice = false;
WebsitePanel.Providers.HostedSolution.LyncUserPlan plan = planSelector.plan; WebsitePanel.Providers.HostedSolution.LyncUserPlan plan = planSelector.plan;
if (plan != null) if (plan != null)
EnterpriseVoice = plan.EnterpriseVoice; enterpriseVoice = plan.EnterpriseVoice && enterpriseVoiceQuota && (ddlPhoneNumber.Items.Count > 0);
pnEnterpriseVoice.Visible = EnterpriseVoice; pnEnterpriseVoice.Visible = enterpriseVoice;
if (!EnterpriseVoice) if (!enterpriseVoice)
{ {
ddlPhoneNumber.Text = ""; ddlPhoneNumber.Text = "";
tbPin.Text = ""; tbPin.Text = "";
} }
if (EnterpriseVoice) if (enterpriseVoice)
{ {
string[] pinPolicy = ES.Services.Lync.GetPolicyList(PanelRequest.ItemID, LyncPolicyType.Pin, "MinPasswordLength"); string[] pinPolicy = ES.Services.Lync.GetPolicyList(PanelRequest.ItemID, LyncPolicyType.Pin, "MinPasswordLength");
if (pinPolicy != null) if (pinPolicy != null)
@ -111,9 +118,15 @@ namespace WebsitePanel.Portal.Lync
if (res.IsSuccess && res.ErrorCodes.Count == 0) if (res.IsSuccess && res.ErrorCodes.Count == 0)
{ {
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
bool enterpriseVoiceQuota = Utils.CheckQouta(Quotas.LYNC_ENTERPRISEVOICE, cntx);
string lineUri = "";
if (enterpriseVoiceQuota) lineUri = ddlPhoneNumber.SelectedItem.Text + ":" + tbPin.Text;
//#1 //#1
LyncUser lyncUser = ES.Services.Lync.GetLyncUserGeneralSettings(PanelRequest.ItemID, accountId); LyncUser lyncUser = ES.Services.Lync.GetLyncUserGeneralSettings(PanelRequest.ItemID, accountId);
ES.Services.Lync.SetLyncUserGeneralSettings(PanelRequest.ItemID, accountId, lyncUser.SipAddress, ddlPhoneNumber.SelectedItem.Text + ":" + tbPin.Text); ES.Services.Lync.SetLyncUserGeneralSettings(PanelRequest.ItemID, accountId, lyncUser.SipAddress, lineUri);
Response.Redirect(EditUrl("AccountID", accountId.ToString(), "edit_lync_user", Response.Redirect(EditUrl("AccountID", accountId.ToString(), "edit_lync_user",
"SpaceID=" + PanelSecurity.PackageId, "SpaceID=" + PanelSecurity.PackageId,

View file

@ -29,6 +29,7 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
// Runtime Version:2.0.50727.3074
// //
// Changes to this file may cause incorrect behavior and will be lost if // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.

View file

@ -52,36 +52,42 @@ namespace WebsitePanel.Portal.Lync
private void BindPhoneNumbers() private void BindPhoneNumbers()
{ {
PackageIPAddress[] ips = ES.Services.Servers.GetPackageUnassignedIPAddresses(PanelSecurity.PackageId, IPAddressPool.PhoneNumbers);
if (ips.Length > 0)
{
ddlPhoneNumber.Items.Add(new ListItem("<Select Phone>", "")); ddlPhoneNumber.Items.Add(new ListItem("<Select Phone>", ""));
PackageIPAddress[] ips = ES.Services.Servers.GetPackageUnassignedIPAddresses(PanelSecurity.PackageId, IPAddressPool.PhoneNumbers);
foreach (PackageIPAddress ip in ips) foreach (PackageIPAddress ip in ips)
{ {
string phone = ip.ExternalIP; string phone = ip.ExternalIP;
ddlPhoneNumber.Items.Add(new ListItem(phone, phone)); ddlPhoneNumber.Items.Add(new ListItem(phone, phone));
} }
}
} }
protected void Page_PreRender(object sender, EventArgs e) protected void Page_PreRender(object sender, EventArgs e)
{ {
bool EnterpriseVoice = false; PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
bool enterpriseVoiceQuota = Utils.CheckQouta(Quotas.LYNC_ENTERPRISEVOICE, cntx);
bool enterpriseVoice = false;
WebsitePanel.Providers.HostedSolution.LyncUserPlan plan = planSelector.plan; WebsitePanel.Providers.HostedSolution.LyncUserPlan plan = planSelector.plan;
if (plan != null) if (plan != null)
EnterpriseVoice = plan.EnterpriseVoice; enterpriseVoice = plan.EnterpriseVoice && enterpriseVoiceQuota && (ddlPhoneNumber.Items.Count > 0);
pnEnterpriseVoice.Visible = EnterpriseVoice; pnEnterpriseVoice.Visible = enterpriseVoice;
if (!EnterpriseVoice) if (!enterpriseVoice)
{ {
ddlPhoneNumber.Text = ""; ddlPhoneNumber.Text = "";
tbPin.Text = ""; tbPin.Text = "";
} }
if (EnterpriseVoice) if (enterpriseVoice)
{ {
string[] pinPolicy = ES.Services.Lync.GetPolicyList(PanelRequest.ItemID, LyncPolicyType.Pin, "MinPasswordLength"); string[] pinPolicy = ES.Services.Lync.GetPolicyList(PanelRequest.ItemID, LyncPolicyType.Pin, "MinPasswordLength");
if (pinPolicy != null) if (pinPolicy != null)
@ -120,10 +126,16 @@ namespace WebsitePanel.Portal.Lync
return; return;
try try
{ {
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
bool enterpriseVoiceQuota = Utils.CheckQouta(Quotas.LYNC_ENTERPRISEVOICE, cntx);
string lineUri = "";
if (enterpriseVoiceQuota) lineUri = ddlPhoneNumber.SelectedItem.Text + ":" + tbPin.Text;
LyncUserResult res = ES.Services.Lync.SetUserLyncPlan(PanelRequest.ItemID, PanelRequest.AccountID, Convert.ToInt32(planSelector.planId)); LyncUserResult res = ES.Services.Lync.SetUserLyncPlan(PanelRequest.ItemID, PanelRequest.AccountID, Convert.ToInt32(planSelector.planId));
if (res.IsSuccess && res.ErrorCodes.Count == 0) if (res.IsSuccess && res.ErrorCodes.Count == 0)
{ {
res = ES.Services.Lync.SetLyncUserGeneralSettings(PanelRequest.ItemID, PanelRequest.AccountID, lyncUserSettings.sipAddress, ddlPhoneNumber.SelectedItem.Text + ":" + tbPin.Text); res = ES.Services.Lync.SetLyncUserGeneralSettings(PanelRequest.ItemID, PanelRequest.AccountID, lyncUserSettings.sipAddress, lineUri);
} }
if (res.IsSuccess && res.ErrorCodes.Count == 0) if (res.IsSuccess && res.ErrorCodes.Count == 0)

View file

@ -29,6 +29,7 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
// Runtime Version:2.0.50727.3074
// //
// Changes to this file may cause incorrect behavior and will be lost if // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.

View file

@ -29,6 +29,7 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
// Runtime Version:2.0.50727.3074
// //
// Changes to this file may cause incorrect behavior and will be lost if // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.

View file

@ -20,7 +20,7 @@
<table cellspacing="6"> <table cellspacing="6">
<tr> <tr>
<td><asp:Localize ID="locIPQuota" runat="server" meta:resourcekey="locIPQuota" Text="Number of Phone Numbes:"></asp:Localize></td> <td><asp:Localize ID="locIPQuota" runat="server" meta:resourcekey="locIPQuota" Text="Number of Phone Numbes:"></asp:Localize></td>
<td><wsp:Quota ID="addressesQuota" runat="server" QuotaName="Web.IPAddresses" /></td> <td><wsp:Quota ID="addressesQuota" runat="server" QuotaName="Lync.PhoneNumbers" /></td>
</tr> </tr>
</table> </table>

View file

@ -29,6 +29,7 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
// Runtime Version:2.0.50727.3074
// //
// Changes to this file may cause incorrect behavior and will be lost if // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.

View file

@ -29,11 +29,11 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
// Runtime Version:2.0.50727.3074
// //
// Changes to this file may cause incorrect behavior and will be lost if // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.
// </auto-generated> // </auto-generated>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace WebsitePanel.Portal { namespace WebsitePanel.Portal {

View file

@ -30,6 +30,7 @@ using System;
using System.Data; using System.Data;
using System.Configuration; using System.Configuration;
using System.Collections; using System.Collections;
using System.Collections.Generic;
using System.Web; using System.Web;
using System.Web.Security; using System.Web.Security;
using System.Web.UI; using System.Web.UI;
@ -73,7 +74,15 @@ namespace WebsitePanel.Portal
{ {
try try
{ {
ddlServer.DataSource = ES.Services.Servers.GetServers(); ServerInfo[] allServers = ES.Services.Servers.GetServers();
List<ServerInfo> servers = new List<ServerInfo>();
foreach(ServerInfo server in allServers)
{
ServiceInfo[] service = ES.Services.Servers.GetServicesByServerIdGroupName(server.ServerId, ResourceGroups.Lync);
if (service.Length>0) servers.Add(server);
}
ddlServer.DataSource = servers;
ddlServer.DataBind(); ddlServer.DataBind();
} }
catch (Exception ex) catch (Exception ex)

View file

@ -29,11 +29,11 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
// Runtime Version:2.0.50727.3074
// //
// Changes to this file may cause incorrect behavior and will be lost if // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.
// </auto-generated> // </auto-generated>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace WebsitePanel.Portal { namespace WebsitePanel.Portal {

View file

@ -30,6 +30,7 @@ using System;
using System.Data; using System.Data;
using System.Configuration; using System.Configuration;
using System.Collections; using System.Collections;
using System.Collections.Generic;
using System.Web; using System.Web;
using System.Web.Security; using System.Web.Security;
using System.Web.UI; using System.Web.UI;
@ -96,7 +97,16 @@ namespace WebsitePanel.Portal
private void BindServers() private void BindServers()
{ {
ddlServer.DataSource = ES.Services.Servers.GetServers(); ServerInfo[] allServers = ES.Services.Servers.GetServers();
List<ServerInfo> servers = new List<ServerInfo>();
foreach (ServerInfo server in allServers)
{
ServiceInfo[] service = ES.Services.Servers.GetServicesByServerIdGroupName(server.ServerId, ResourceGroups.Lync);
if (service.Length > 0) servers.Add(server);
}
ddlServer.DataSource = servers;
ddlServer.DataBind(); ddlServer.DataBind();
ddlServer.Items.Insert(0, new ListItem(GetLocalizedString("Text.NotAssigned"), "")); ddlServer.Items.Insert(0, new ListItem(GetLocalizedString("Text.NotAssigned"), ""));
} }

View file

@ -29,11 +29,11 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
// Runtime Version:2.0.50727.3074
// //
// Changes to this file may cause incorrect behavior and will be lost if // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.
// </auto-generated> // </auto-generated>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace WebsitePanel.Portal { namespace WebsitePanel.Portal {

View file

@ -105,11 +105,6 @@
<asp:CheckBox ID="chkRemoteUserAccess" runat="server" meta:resourcekey="chkRemoteUserAccess" Text="Remote User access"></asp:CheckBox> <asp:CheckBox ID="chkRemoteUserAccess" runat="server" meta:resourcekey="chkRemoteUserAccess" Text="Remote User access"></asp:CheckBox>
</td> </td>
</tr> </tr>
<tr>
<td>
<asp:CheckBox ID="chkPublicIMConnectivity" runat="server" meta:resourcekey="chkPublicIMConnectivity" Text="Public IM Connectivity"></asp:CheckBox>
</td>
</tr>
</table> </table>
<br /> <br />
</asp:Panel> </asp:Panel>

View file

@ -173,7 +173,6 @@ namespace WebsitePanel.Portal
plan.VoicePolicy = LyncVoicePolicyType.None; plan.VoicePolicy = LyncVoicePolicyType.None;
plan.RemoteUserAccess = chkRemoteUserAccess.Checked; plan.RemoteUserAccess = chkRemoteUserAccess.Checked;
plan.PublicIMConnectivity = chkPublicIMConnectivity.Checked;
plan.AllowOrganizeMeetingsWithExternalAnonymous = chkAllowOrganizeMeetingsWithExternalAnonymous.Checked; plan.AllowOrganizeMeetingsWithExternalAnonymous = chkAllowOrganizeMeetingsWithExternalAnonymous.Checked;
@ -314,7 +313,6 @@ namespace WebsitePanel.Portal
chkEnterpriseVoice.Checked = plan.EnterpriseVoice; chkEnterpriseVoice.Checked = plan.EnterpriseVoice;
chkRemoteUserAccess.Checked = plan.RemoteUserAccess; chkRemoteUserAccess.Checked = plan.RemoteUserAccess;
chkPublicIMConnectivity.Checked = plan.PublicIMConnectivity;
chkAllowOrganizeMeetingsWithExternalAnonymous.Checked = plan.AllowOrganizeMeetingsWithExternalAnonymous; chkAllowOrganizeMeetingsWithExternalAnonymous.Checked = plan.AllowOrganizeMeetingsWithExternalAnonymous;
ddTelephony.SelectedIndex = plan.Telephony; ddTelephony.SelectedIndex = plan.Telephony;
@ -437,7 +435,6 @@ namespace WebsitePanel.Portal
plan.VoicePolicy = LyncVoicePolicyType.None; plan.VoicePolicy = LyncVoicePolicyType.None;
plan.RemoteUserAccess = chkRemoteUserAccess.Checked; plan.RemoteUserAccess = chkRemoteUserAccess.Checked;
plan.PublicIMConnectivity = chkPublicIMConnectivity.Checked;
plan.AllowOrganizeMeetingsWithExternalAnonymous = chkAllowOrganizeMeetingsWithExternalAnonymous.Checked; plan.AllowOrganizeMeetingsWithExternalAnonymous = chkAllowOrganizeMeetingsWithExternalAnonymous.Checked;

View file

@ -29,11 +29,13 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
// Runtime Version:2.0.50727.3074
// //
// Changes to this file may cause incorrect behavior and will be lost if // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.
// </auto-generated> // </auto-generated>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace WebsitePanel.Portal { namespace WebsitePanel.Portal {
@ -45,6 +47,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks; protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks;
@ -54,6 +57,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox; protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
@ -63,6 +67,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.GridView gvPlans; protected global::System.Web.UI.WebControls.GridView gvPlans;
@ -72,6 +77,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secPlan; protected global::WebsitePanel.Portal.CollapsiblePanel secPlan;
@ -81,6 +87,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Panel Plan; protected global::System.Web.UI.WebControls.Panel Plan;
@ -90,6 +97,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtPlan; protected global::System.Web.UI.WebControls.TextBox txtPlan;
@ -99,6 +107,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.RequiredFieldValidator valRequirePlan; protected global::System.Web.UI.WebControls.RequiredFieldValidator valRequirePlan;
@ -108,6 +117,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secPlanFeatures; protected global::WebsitePanel.Portal.CollapsiblePanel secPlanFeatures;
@ -117,6 +127,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Panel PlanFeatures; protected global::System.Web.UI.WebControls.Panel PlanFeatures;
@ -126,6 +137,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.CheckBox chkIM; protected global::System.Web.UI.WebControls.CheckBox chkIM;
@ -135,6 +147,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.CheckBox chkMobility; protected global::System.Web.UI.WebControls.CheckBox chkMobility;
@ -144,6 +157,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.CheckBox chkConferencing; protected global::System.Web.UI.WebControls.CheckBox chkConferencing;
@ -153,6 +167,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.CheckBox chkEnterpriseVoice; protected global::System.Web.UI.WebControls.CheckBox chkEnterpriseVoice;
@ -162,6 +177,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secPlanFeaturesFederation; protected global::WebsitePanel.Portal.CollapsiblePanel secPlanFeaturesFederation;
@ -171,6 +187,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Panel PlanFeaturesFederation; protected global::System.Web.UI.WebControls.Panel PlanFeaturesFederation;
@ -180,6 +197,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.CheckBox chkFederation; protected global::System.Web.UI.WebControls.CheckBox chkFederation;
@ -189,24 +207,17 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.CheckBox chkRemoteUserAccess; protected global::System.Web.UI.WebControls.CheckBox chkRemoteUserAccess;
/// <summary>
/// chkPublicIMConnectivity control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox chkPublicIMConnectivity;
/// <summary> /// <summary>
/// secPlanFeaturesArchiving control. /// secPlanFeaturesArchiving control.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secPlanFeaturesArchiving; protected global::WebsitePanel.Portal.CollapsiblePanel secPlanFeaturesArchiving;
@ -216,6 +227,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Panel PlanFeaturesArchiving; protected global::System.Web.UI.WebControls.Panel PlanFeaturesArchiving;
@ -225,6 +237,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Localize locArchivingPolicy; protected global::System.Web.UI.WebControls.Localize locArchivingPolicy;
@ -234,6 +247,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.DropDownList ddArchivingPolicy; protected global::System.Web.UI.WebControls.DropDownList ddArchivingPolicy;
@ -243,6 +257,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secPlanFeaturesMeeting; protected global::WebsitePanel.Portal.CollapsiblePanel secPlanFeaturesMeeting;
@ -252,6 +267,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Panel PlanFeaturesMeeting; protected global::System.Web.UI.WebControls.Panel PlanFeaturesMeeting;
@ -261,6 +277,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.CheckBox chkAllowOrganizeMeetingsWithExternalAnonymous; protected global::System.Web.UI.WebControls.CheckBox chkAllowOrganizeMeetingsWithExternalAnonymous;
@ -270,6 +287,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secPlanFeaturesTelephony; protected global::WebsitePanel.Portal.CollapsiblePanel secPlanFeaturesTelephony;
@ -279,6 +297,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Panel PlanFeaturesTelephony; protected global::System.Web.UI.WebControls.Panel PlanFeaturesTelephony;
@ -288,6 +307,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Localize locTelephony; protected global::System.Web.UI.WebControls.Localize locTelephony;
@ -297,6 +317,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.DropDownList ddTelephony; protected global::System.Web.UI.WebControls.DropDownList ddTelephony;
@ -306,6 +327,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Panel pnEnterpriseVoice; protected global::System.Web.UI.WebControls.Panel pnEnterpriseVoice;
@ -315,6 +337,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Localize locTelephonyProvider; protected global::System.Web.UI.WebControls.Localize locTelephonyProvider;
@ -324,6 +347,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.TextBox tbTelephoneProvider; protected global::System.Web.UI.WebControls.TextBox tbTelephoneProvider;
@ -333,6 +357,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Button btnAccept; protected global::System.Web.UI.WebControls.Button btnAccept;
@ -342,6 +367,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.RequiredFieldValidator AcceptRequiredValidator; protected global::System.Web.UI.WebControls.RequiredFieldValidator AcceptRequiredValidator;
@ -351,6 +377,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Localize locDialPlan; protected global::System.Web.UI.WebControls.Localize locDialPlan;
@ -360,6 +387,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.DropDownList ddTelephonyDialPlanPolicy; protected global::System.Web.UI.WebControls.DropDownList ddTelephonyDialPlanPolicy;
@ -369,6 +397,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Localize locVoicePolicy; protected global::System.Web.UI.WebControls.Localize locVoicePolicy;
@ -378,6 +407,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.DropDownList ddTelephonyVoicePolicy; protected global::System.Web.UI.WebControls.DropDownList ddTelephonyVoicePolicy;
@ -387,6 +417,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Panel pnServerURI; protected global::System.Web.UI.WebControls.Panel pnServerURI;
@ -396,6 +427,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Localize locServerURI; protected global::System.Web.UI.WebControls.Localize locServerURI;
@ -405,6 +437,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.TextBox tbServerURI; protected global::System.Web.UI.WebControls.TextBox tbServerURI;
@ -414,6 +447,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Button btnAddPlan; protected global::System.Web.UI.WebControls.Button btnAddPlan;
@ -423,6 +457,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Button btnUpdatePlan; protected global::System.Web.UI.WebControls.Button btnUpdatePlan;
@ -432,6 +467,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtStatus; protected global::System.Web.UI.WebControls.TextBox txtStatus;
} }

View file

@ -57,6 +57,10 @@
<td class="SubHead" nowrap><asp:Label ID="lblLyncUsers" runat="server" meta:resourcekey="lblLyncUsers" Text="Lync Users:"></asp:Label></td> <td class="SubHead" nowrap><asp:Label ID="lblLyncUsers" runat="server" meta:resourcekey="lblLyncUsers" Text="Lync Users:"></asp:Label></td>
<td class="Normal"><wsp:Quota ID="quotaLyncUsers" runat="server" QuotaName="Lync.Users" DisplayGauge="True" /></td> <td class="Normal"><wsp:Quota ID="quotaLyncUsers" runat="server" QuotaName="Lync.Users" DisplayGauge="True" /></td>
</tr> </tr>
<tr ID="pnlLyncPhone" runat="server">
<td class="SubHead" nowrap><asp:Label ID="Label1" runat="server" meta:resourcekey="lblLyncPhone" Text="Lync Phone Numbers:"></asp:Label></td>
<td class="Normal"><wsp:Quota ID="quotaLyncPhone" runat="server" QuotaName="Lync.PhoneNumbers" DisplayGauge="True" /></td>
</tr>
<tr ID="pnlBlackBerryUsers" runat="server"> <tr ID="pnlBlackBerryUsers" runat="server">
<td class="SubHead" nowrap><asp:Label ID="lblBlackBerryUsers" runat="server" meta:resourcekey="lblBlackBerryUsers" Text="BlackBerry Users:"></asp:Label></td> <td class="SubHead" nowrap><asp:Label ID="lblBlackBerryUsers" runat="server" meta:resourcekey="lblBlackBerryUsers" Text="BlackBerry Users:"></asp:Label></td>

View file

@ -29,6 +29,7 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
// Runtime Version:2.0.50727.3074
// //
// Changes to this file may cause incorrect behavior and will be lost if // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.
@ -46,6 +47,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlDiskspace; protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlDiskspace;
@ -55,6 +57,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.Quota quotaDiskspace; protected global::WebsitePanel.Portal.Quota quotaDiskspace;
@ -64,6 +67,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.HyperLink lnkViewDiskspaceDetails; protected global::System.Web.UI.WebControls.HyperLink lnkViewDiskspaceDetails;
@ -73,6 +77,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlBandwidth; protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlBandwidth;
@ -82,6 +87,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.Quota quotaBandwidth; protected global::WebsitePanel.Portal.Quota quotaBandwidth;
@ -91,6 +97,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.HyperLink lnkViewBandwidthDetails; protected global::System.Web.UI.WebControls.HyperLink lnkViewBandwidthDetails;
@ -100,6 +107,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlDomains; protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlDomains;
@ -109,6 +117,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Label lblDomains; protected global::System.Web.UI.WebControls.Label lblDomains;
@ -118,6 +127,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.Quota quotaDomains; protected global::WebsitePanel.Portal.Quota quotaDomains;
@ -127,6 +137,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlSubDomains; protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlSubDomains;
@ -136,6 +147,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Label lblSubDomains; protected global::System.Web.UI.WebControls.Label lblSubDomains;
@ -145,6 +157,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.Quota quotaSubDomains; protected global::WebsitePanel.Portal.Quota quotaSubDomains;
@ -154,6 +167,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlDomainPointers; protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlDomainPointers;
@ -163,6 +177,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Label lblDomainPointers; protected global::System.Web.UI.WebControls.Label lblDomainPointers;
@ -172,6 +187,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.Quota quotaDomainPointers; protected global::WebsitePanel.Portal.Quota quotaDomainPointers;
@ -181,6 +197,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlOrganizations; protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlOrganizations;
@ -190,6 +207,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Label lblOrganizations; protected global::System.Web.UI.WebControls.Label lblOrganizations;
@ -199,6 +217,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.Quota quotaOrganizations; protected global::WebsitePanel.Portal.Quota quotaOrganizations;
@ -208,6 +227,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlUserAccounts; protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlUserAccounts;
@ -217,6 +237,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Label lblUserAccounts; protected global::System.Web.UI.WebControls.Label lblUserAccounts;
@ -226,6 +247,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.Quota quotaUserAccounts; protected global::WebsitePanel.Portal.Quota quotaUserAccounts;
@ -235,6 +257,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlExchangeAccounts; protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlExchangeAccounts;
@ -244,6 +267,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Label lblExchangeAccounts; protected global::System.Web.UI.WebControls.Label lblExchangeAccounts;
@ -253,6 +277,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.Quota quotaExchangeAccounts; protected global::WebsitePanel.Portal.Quota quotaExchangeAccounts;
@ -262,6 +287,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlExchangeStorage; protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlExchangeStorage;
@ -271,6 +297,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Label lblExchangeStorage; protected global::System.Web.UI.WebControls.Label lblExchangeStorage;
@ -280,6 +307,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.Quota quotaExchangeStorage; protected global::WebsitePanel.Portal.Quota quotaExchangeStorage;
@ -289,6 +317,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlMailAccounts; protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlMailAccounts;
@ -298,6 +327,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Label lblMailAccounts; protected global::System.Web.UI.WebControls.Label lblMailAccounts;
@ -307,6 +337,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.Quota quotaMailAccounts; protected global::WebsitePanel.Portal.Quota quotaMailAccounts;
@ -316,6 +347,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlOCSUsers; protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlOCSUsers;
@ -325,6 +357,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Label lblOCSUsers; protected global::System.Web.UI.WebControls.Label lblOCSUsers;
@ -334,6 +367,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.Quota quotaOCSUsers; protected global::WebsitePanel.Portal.Quota quotaOCSUsers;
@ -343,6 +377,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlLyncUsers; protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlLyncUsers;
@ -352,6 +387,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Label lblLyncUsers; protected global::System.Web.UI.WebControls.Label lblLyncUsers;
@ -361,15 +397,47 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.Quota quotaLyncUsers; protected global::WebsitePanel.Portal.Quota quotaLyncUsers;
/// <summary>
/// pnlLyncPhone control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlLyncPhone;
/// <summary>
/// Label1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label1;
/// <summary>
/// quotaLyncPhone control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.Quota quotaLyncPhone;
/// <summary> /// <summary>
/// pnlBlackBerryUsers control. /// pnlBlackBerryUsers control.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlBlackBerryUsers; protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlBlackBerryUsers;
@ -379,6 +447,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Label lblBlackBerryUsers; protected global::System.Web.UI.WebControls.Label lblBlackBerryUsers;
@ -388,6 +457,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.Quota quotaBlackBerryUsers; protected global::WebsitePanel.Portal.Quota quotaBlackBerryUsers;
@ -397,6 +467,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlSharepointSites; protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlSharepointSites;
@ -406,6 +477,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Label lblSharepointSites; protected global::System.Web.UI.WebControls.Label lblSharepointSites;
@ -415,6 +487,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.Quota quotaSharepointSites; protected global::WebsitePanel.Portal.Quota quotaSharepointSites;
@ -424,6 +497,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlWebSites; protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlWebSites;
@ -433,6 +507,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Label lblWebSites; protected global::System.Web.UI.WebControls.Label lblWebSites;
@ -442,6 +517,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.Quota quotaWebSites; protected global::WebsitePanel.Portal.Quota quotaWebSites;
@ -451,6 +527,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlFtpAccounts; protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlFtpAccounts;
@ -460,6 +537,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Label lblFtpAccounts; protected global::System.Web.UI.WebControls.Label lblFtpAccounts;
@ -469,6 +547,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.Quota quotaFtpAccounts; protected global::WebsitePanel.Portal.Quota quotaFtpAccounts;
@ -478,6 +557,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlDatabases; protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlDatabases;
@ -487,6 +567,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Label lblDatabases; protected global::System.Web.UI.WebControls.Label lblDatabases;
@ -496,6 +577,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.Quota quotaDatabases; protected global::WebsitePanel.Portal.Quota quotaDatabases;
@ -505,6 +587,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlHyperVForPC; protected global::System.Web.UI.HtmlControls.HtmlTableRow pnlHyperVForPC;
@ -514,6 +597,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Label lblHyperVForPC; protected global::System.Web.UI.WebControls.Label lblHyperVForPC;
@ -523,6 +607,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::WebsitePanel.Portal.Quota quotaNumberOfVm; protected global::WebsitePanel.Portal.Quota quotaNumberOfVm;
@ -532,6 +617,7 @@ namespace WebsitePanel.Portal {
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Button btnViewQuotas; protected global::System.Web.UI.WebControls.Button btnViewQuotas;
} }

View file

@ -90,7 +90,7 @@ namespace WebsitePanel.Portal.UserControls
} }
int quotaAllowed = -1; int quotaAllowed = -1;
string quotaName = (String.Compare(ResourceGroup, ResourceGroups.VPS, true) == 0) ? Quotas.VPS_EXTERNAL_IP_ADDRESSES_NUMBER : Quotas.WEB_IP_ADDRESSES; string quotaName = Quotas.LYNC_PHONE;
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId); PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
if (cntx.Quotas.ContainsKey(quotaName)) if (cntx.Quotas.ContainsKey(quotaName))
{ {

View file

@ -29,6 +29,7 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
// Runtime Version:2.0.50727.3074
// //
// Changes to this file may cause incorrect behavior and will be lost if // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.

View file

@ -29,6 +29,7 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
// Runtime Version:2.0.50727.3074
// //
// Changes to this file may cause incorrect behavior and will be lost if // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.

View file

@ -79,5 +79,11 @@ namespace WebsitePanel.Portal
{ {
ddlFilterColumn.Items.Add(new ListItem(columnTitle, columnName)); ddlFilterColumn.Items.Add(new ListItem(columnTitle, columnName));
} }
public override void Focus()
{
base.Focus();
txtFilterValue.Focus();
}
} }
} }

View file

@ -67,7 +67,10 @@ namespace WebsitePanel.Portal
gvUsers.Sort("Username", System.Web.UI.WebControls.SortDirection.Ascending); gvUsers.Sort("Username", System.Web.UI.WebControls.SortDirection.Ascending);
} }
searchBox.Focus();
} }
public string GetUserHomePageUrl(int userId) public string GetUserHomePageUrl(int userId)

View file

@ -44,6 +44,9 @@ namespace WebsitePanel.Portal
this.ContainerControl.Visible = (PanelSecurity.SelectedUser.Role != UserRole.User); this.ContainerControl.Visible = (PanelSecurity.SelectedUser.Role != UserRole.User);
lnkAllCustomers.NavigateUrl = NavigatePageURL(PortalUtils.GetUserCustomersPageId(), lnkAllCustomers.NavigateUrl = NavigatePageURL(PortalUtils.GetUserCustomersPageId(),
PortalUtils.USER_ID_PARAM, PanelSecurity.SelectedUserId.ToString()); PortalUtils.USER_ID_PARAM, PanelSecurity.SelectedUserId.ToString());
if (!IsPostBack)
txtFilterValue.Focus();
} }
private void BindGroupings() private void BindGroupings()

View file

@ -209,6 +209,13 @@
<Compile Include="Code\ReportingServices\IResourceStorage.cs" /> <Compile Include="Code\ReportingServices\IResourceStorage.cs" />
<Compile Include="Code\ReportingServices\ReportingServicesUtils.cs" /> <Compile Include="Code\ReportingServices\ReportingServicesUtils.cs" />
<Compile Include="Code\UserControls\Tab.cs" /> <Compile Include="Code\UserControls\Tab.cs" />
<Compile Include="ExchangeServer\OrganizationSecurityGroupMemberOf.ascx.cs">
<DependentUpon>OrganizationSecurityGroupMemberOf.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="ExchangeServer\OrganizationSecurityGroupMemberOf.ascx.designer.cs">
<DependentUpon>OrganizationSecurityGroupMemberOf.ascx</DependentUpon>
</Compile>
<Compile Include="ExchangeServer\ExchangeDistributionListMemberOf.ascx.cs"> <Compile Include="ExchangeServer\ExchangeDistributionListMemberOf.ascx.cs">
<DependentUpon>ExchangeDistributionListMemberOf.ascx</DependentUpon> <DependentUpon>ExchangeDistributionListMemberOf.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType> <SubType>ASPXCodeBehind</SubType>
@ -3979,6 +3986,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="ApplyEnableHardQuotaFeature.ascx" /> <Content Include="ApplyEnableHardQuotaFeature.ascx" />
<Content Include="ExchangeServer\OrganizationSecurityGroupMemberOf.ascx" />
<Content Include="ExchangeServer\ExchangeDistributionListMemberOf.ascx" /> <Content Include="ExchangeServer\ExchangeDistributionListMemberOf.ascx" />
<Content Include="ExchangeServer\ExchangeMailboxMemberOf.ascx" /> <Content Include="ExchangeServer\ExchangeMailboxMemberOf.ascx" />
<Content Include="ExchangeServer\OrganizationAddDomainName.ascx" /> <Content Include="ExchangeServer\OrganizationAddDomainName.ascx" />