merge commit
This commit is contained in:
commit
6eb1661ca9
99 changed files with 4420 additions and 745 deletions
|
@ -5508,6 +5508,46 @@ CREATE TABLE [dbo].[RDSCollectionSettings](
|
||||||
|
|
||||||
GO
|
GO
|
||||||
|
|
||||||
|
IF NOT EXISTS(SELECT * FROM sys.columns
|
||||||
|
WHERE [name] = N'SecurityLayer' AND [object_id] = OBJECT_ID(N'RDSCollectionSettings'))
|
||||||
|
BEGIN
|
||||||
|
ALTER TABLE [dbo].[RDSCollectionSettings] ADD SecurityLayer NVARCHAR(20) null;
|
||||||
|
END
|
||||||
|
GO
|
||||||
|
|
||||||
|
IF NOT EXISTS(SELECT * FROM sys.columns
|
||||||
|
WHERE [name] = N'EncryptionLevel' AND [object_id] = OBJECT_ID(N'RDSCollectionSettings'))
|
||||||
|
BEGIN
|
||||||
|
ALTER TABLE [dbo].[RDSCollectionSettings] ADD EncryptionLevel NVARCHAR(20) null;
|
||||||
|
END
|
||||||
|
GO
|
||||||
|
|
||||||
|
IF NOT EXISTS(SELECT * FROM sys.columns
|
||||||
|
WHERE [name] = N'AuthenticateUsingNLA' AND [object_id] = OBJECT_ID(N'RDSCollectionSettings'))
|
||||||
|
BEGIN
|
||||||
|
ALTER TABLE [dbo].[RDSCollectionSettings] ADD AuthenticateUsingNLA BIT null;
|
||||||
|
END
|
||||||
|
GO
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
IF NOT EXISTS(SELECT * FROM SYS.TABLES WHERE name = 'RDSCertificates')
|
||||||
|
CREATE TABLE [dbo].[RDSCertificates](
|
||||||
|
[ID] [int] IDENTITY(1,1) NOT NULL,
|
||||||
|
[ServiceId] [int] NOT NULL,
|
||||||
|
[Content] [ntext] NOT NULL,
|
||||||
|
[Hash] [nvarchar](255) NOT NULL,
|
||||||
|
[FileName] [nvarchar](255) NOT NULL,
|
||||||
|
[ValidFrom] [datetime] NULL,
|
||||||
|
[ExpiryDate] [datetime] NULL
|
||||||
|
CONSTRAINT [PK_RDSCertificates] PRIMARY KEY CLUSTERED
|
||||||
|
(
|
||||||
|
[ID] ASC
|
||||||
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||||
|
) ON [PRIMARY]
|
||||||
|
|
||||||
|
GO
|
||||||
|
|
||||||
|
|
||||||
ALTER TABLE [dbo].[RDSCollectionUsers]
|
ALTER TABLE [dbo].[RDSCollectionUsers]
|
||||||
DROP CONSTRAINT [FK_RDSCollectionUsers_RDSCollectionId]
|
DROP CONSTRAINT [FK_RDSCollectionUsers_RDSCollectionId]
|
||||||
|
@ -5548,6 +5588,66 @@ GO
|
||||||
|
|
||||||
/*Remote Desktop Services Procedures*/
|
/*Remote Desktop Services Procedures*/
|
||||||
|
|
||||||
|
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'AddRDSCertificate')
|
||||||
|
DROP PROCEDURE AddRDSCertificate
|
||||||
|
GO
|
||||||
|
CREATE PROCEDURE [dbo].[AddRDSCertificate]
|
||||||
|
(
|
||||||
|
@RDSCertificateId INT OUTPUT,
|
||||||
|
@ServiceId INT,
|
||||||
|
@Content NTEXT,
|
||||||
|
@Hash NVARCHAR(255),
|
||||||
|
@FileName NVARCHAR(255),
|
||||||
|
@ValidFrom DATETIME,
|
||||||
|
@ExpiryDate DATETIME
|
||||||
|
)
|
||||||
|
AS
|
||||||
|
INSERT INTO RDSCertificates
|
||||||
|
(
|
||||||
|
ServiceId,
|
||||||
|
Content,
|
||||||
|
Hash,
|
||||||
|
FileName,
|
||||||
|
ValidFrom,
|
||||||
|
ExpiryDate
|
||||||
|
)
|
||||||
|
VALUES
|
||||||
|
(
|
||||||
|
@ServiceId,
|
||||||
|
@Content,
|
||||||
|
@Hash,
|
||||||
|
@FileName,
|
||||||
|
@ValidFrom,
|
||||||
|
@ExpiryDate
|
||||||
|
)
|
||||||
|
|
||||||
|
SET @RDSCertificateId = SCOPE_IDENTITY()
|
||||||
|
|
||||||
|
RETURN
|
||||||
|
GO
|
||||||
|
|
||||||
|
|
||||||
|
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'GetRDSCertificateByServiceId')
|
||||||
|
DROP PROCEDURE GetRDSCertificateByServiceId
|
||||||
|
GO
|
||||||
|
CREATE PROCEDURE [dbo].[GetRDSCertificateByServiceId]
|
||||||
|
(
|
||||||
|
@ServiceId INT
|
||||||
|
)
|
||||||
|
AS
|
||||||
|
SELECT TOP 1
|
||||||
|
Id,
|
||||||
|
ServiceId,
|
||||||
|
Content,
|
||||||
|
Hash,
|
||||||
|
FileName,
|
||||||
|
ValidFrom,
|
||||||
|
ExpiryDate
|
||||||
|
FROM RDSCertificates
|
||||||
|
WHERE ServiceId = @ServiceId
|
||||||
|
ORDER BY Id DESC
|
||||||
|
GO
|
||||||
|
|
||||||
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'AddRDSServer')
|
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'AddRDSServer')
|
||||||
DROP PROCEDURE AddRDSServer
|
DROP PROCEDURE AddRDSServer
|
||||||
GO
|
GO
|
||||||
|
@ -8746,11 +8846,148 @@ AND ((@GroupName IS NULL) OR (@GroupName IS NOT NULL AND RG.GroupName = @GroupNa
|
||||||
RETURN
|
RETURN
|
||||||
GO
|
GO
|
||||||
|
|
||||||
-- Hyper-V 2012 R2
|
|
||||||
IF NOT EXISTS (SELECT * FROM [dbo].[Providers] WHERE [ProviderName] = 'HyperV2012R2')
|
--ES OWA Editing
|
||||||
BEGIN
|
IF NOT EXISTS (SELECT * FROM SYS.TABLES WHERE name = 'EnterpriseFoldersOwaPermissions')
|
||||||
INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (350, 30, N'HyperV2012R2', N'Microsoft Hyper-V 2012 R2', N'WebsitePanel.Providers.Virtualization.HyperV2012R2, WebsitePanel.Providers.Virtualization.HyperV2012R2', N'HyperV', 1)
|
CREATE TABLE EnterpriseFoldersOwaPermissions
|
||||||
END
|
(
|
||||||
|
ID INT IDENTITY(1,1) NOT NULL PRIMARY KEY,
|
||||||
|
ItemID INT NOT NULL,
|
||||||
|
FolderID INT NOT NULL,
|
||||||
|
AccountID INT NOT NULL
|
||||||
|
)
|
||||||
|
GO
|
||||||
|
|
||||||
|
IF EXISTS (SELECT * FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS WHERE CONSTRAINT_NAME ='FK_EnterpriseFoldersOwaPermissions_AccountId')
|
||||||
|
ALTER TABLE [dbo].[EnterpriseFoldersOwaPermissions]
|
||||||
|
DROP CONSTRAINT [FK_EnterpriseFoldersOwaPermissions_AccountId]
|
||||||
|
GO
|
||||||
|
|
||||||
|
ALTER TABLE [dbo].[EnterpriseFoldersOwaPermissions] WITH CHECK ADD CONSTRAINT [FK_EnterpriseFoldersOwaPermissions_AccountId] FOREIGN KEY([AccountID])
|
||||||
|
REFERENCES [dbo].[ExchangeAccounts] ([AccountID])
|
||||||
|
ON DELETE CASCADE
|
||||||
|
GO
|
||||||
|
|
||||||
|
IF EXISTS (SELECT * FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS WHERE CONSTRAINT_NAME ='FK_EnterpriseFoldersOwaPermissions_FolderId')
|
||||||
|
ALTER TABLE [dbo].[EnterpriseFoldersOwaPermissions]
|
||||||
|
DROP CONSTRAINT [FK_EnterpriseFoldersOwaPermissions_FolderId]
|
||||||
|
GO
|
||||||
|
|
||||||
|
ALTER TABLE [dbo].[EnterpriseFoldersOwaPermissions] WITH CHECK ADD CONSTRAINT [FK_EnterpriseFoldersOwaPermissions_FolderId] FOREIGN KEY([FolderID])
|
||||||
|
REFERENCES [dbo].[EnterpriseFolders] ([EnterpriseFolderID])
|
||||||
|
ON DELETE CASCADE
|
||||||
|
GO
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'DeleteAllEnterpriseFolderOwaUsers')
|
||||||
|
DROP PROCEDURE DeleteAllEnterpriseFolderOwaUsers
|
||||||
|
GO
|
||||||
|
CREATE PROCEDURE [dbo].[DeleteAllEnterpriseFolderOwaUsers]
|
||||||
|
(
|
||||||
|
@ItemID int,
|
||||||
|
@FolderID int
|
||||||
|
)
|
||||||
|
AS
|
||||||
|
DELETE FROM EnterpriseFoldersOwaPermissions
|
||||||
|
WHERE ItemId = @ItemID AND FolderID = @FolderID
|
||||||
|
GO
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'AddEnterpriseFolderOwaUser')
|
||||||
|
DROP PROCEDURE AddEnterpriseFolderOwaUser
|
||||||
|
GO
|
||||||
|
CREATE PROCEDURE [dbo].[AddEnterpriseFolderOwaUser]
|
||||||
|
(
|
||||||
|
@ESOwsaUserId INT OUTPUT,
|
||||||
|
@ItemID INT,
|
||||||
|
@FolderID INT,
|
||||||
|
@AccountID INT
|
||||||
|
)
|
||||||
|
AS
|
||||||
|
INSERT INTO EnterpriseFoldersOwaPermissions
|
||||||
|
(
|
||||||
|
ItemID ,
|
||||||
|
FolderID,
|
||||||
|
AccountID
|
||||||
|
)
|
||||||
|
VALUES
|
||||||
|
(
|
||||||
|
@ItemID,
|
||||||
|
@FolderID,
|
||||||
|
@AccountID
|
||||||
|
)
|
||||||
|
|
||||||
|
SET @ESOwsaUserId = SCOPE_IDENTITY()
|
||||||
|
|
||||||
|
RETURN
|
||||||
|
GO
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'GetEnterpriseFolderOwaUsers')
|
||||||
|
DROP PROCEDURE GetEnterpriseFolderOwaUsers
|
||||||
|
GO
|
||||||
|
CREATE PROCEDURE [dbo].[GetEnterpriseFolderOwaUsers]
|
||||||
|
(
|
||||||
|
@ItemID INT,
|
||||||
|
@FolderID INT
|
||||||
|
)
|
||||||
|
AS
|
||||||
|
SELECT
|
||||||
|
EA.AccountID,
|
||||||
|
EA.ItemID,
|
||||||
|
EA.AccountType,
|
||||||
|
EA.AccountName,
|
||||||
|
EA.DisplayName,
|
||||||
|
EA.PrimaryEmailAddress,
|
||||||
|
EA.MailEnabledPublicFolder,
|
||||||
|
EA.MailboxPlanId,
|
||||||
|
EA.SubscriberNumber,
|
||||||
|
EA.UserPrincipalName
|
||||||
|
FROM EnterpriseFoldersOwaPermissions AS EFOP
|
||||||
|
LEFT JOIN ExchangeAccounts AS EA ON EA.AccountID = EFOP.AccountID
|
||||||
|
WHERE EFOP.ItemID = @ItemID AND EFOP.FolderID = @FolderID
|
||||||
|
GO
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'GetEnterpriseFolderId')
|
||||||
|
DROP PROCEDURE GetEnterpriseFolderId
|
||||||
|
GO
|
||||||
|
CREATE PROCEDURE [dbo].[GetEnterpriseFolderId]
|
||||||
|
(
|
||||||
|
@ItemID INT,
|
||||||
|
@FolderName varchar(max)
|
||||||
|
)
|
||||||
|
AS
|
||||||
|
SELECT TOP 1
|
||||||
|
EnterpriseFolderID
|
||||||
|
FROM EnterpriseFolders
|
||||||
|
WHERE ItemId = @ItemID AND FolderName = @FolderName
|
||||||
|
GO
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'GetUserEnterpriseFolderWithOwaEditPermission')
|
||||||
|
DROP PROCEDURE GetUserEnterpriseFolderWithOwaEditPermission
|
||||||
|
GO
|
||||||
|
CREATE PROCEDURE [dbo].[GetUserEnterpriseFolderWithOwaEditPermission]
|
||||||
|
(
|
||||||
|
@ItemID INT,
|
||||||
|
@AccountID INT
|
||||||
|
)
|
||||||
|
AS
|
||||||
|
SELECT
|
||||||
|
EF.FolderName
|
||||||
|
FROM EnterpriseFoldersOwaPermissions AS EFOP
|
||||||
|
LEFT JOIN [dbo].[EnterpriseFolders] AS EF ON EF.EnterpriseFolderID = EFOP.FolderID
|
||||||
|
WHERE EFOP.ItemID = @ItemID AND EFOP.AccountID = @AccountID
|
||||||
GO
|
GO
|
||||||
|
|
||||||
-- Hyper-V 2012 R2
|
-- Hyper-V 2012 R2
|
||||||
|
@ -8758,4 +8995,5 @@ IF NOT EXISTS (SELECT * FROM [dbo].[Providers] WHERE [ProviderName] = 'HyperV201
|
||||||
BEGIN
|
BEGIN
|
||||||
INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (350, 30, N'HyperV2012R2', N'Microsoft Hyper-V 2012 R2', N'WebsitePanel.Providers.Virtualization.HyperV2012R2, WebsitePanel.Providers.Virtualization.HyperV2012R2', N'HyperV', 1)
|
INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (350, 30, N'HyperV2012R2', N'Microsoft Hyper-V 2012 R2', N'WebsitePanel.Providers.Virtualization.HyperV2012R2, WebsitePanel.Providers.Virtualization.HyperV2012R2', N'HyperV', 1)
|
||||||
END
|
END
|
||||||
GO
|
GO
|
||||||
|
|
||||||
|
|
|
@ -81,6 +81,16 @@ namespace WebsitePanel.EnterpriseServer {
|
||||||
|
|
||||||
private System.Threading.SendOrPostCallback SetEnterpriseFolderSettingsOperationCompleted;
|
private System.Threading.SendOrPostCallback SetEnterpriseFolderSettingsOperationCompleted;
|
||||||
|
|
||||||
|
private System.Threading.SendOrPostCallback SetEnterpriseFolderGeneralSettingsOperationCompleted;
|
||||||
|
|
||||||
|
private System.Threading.SendOrPostCallback SetEnterpriseFolderPermissionSettingsOperationCompleted;
|
||||||
|
|
||||||
|
private System.Threading.SendOrPostCallback GetFolderOwaAccountsOperationCompleted;
|
||||||
|
|
||||||
|
private System.Threading.SendOrPostCallback SetFolderOwaAccountsOperationCompleted;
|
||||||
|
|
||||||
|
private System.Threading.SendOrPostCallback GetUserEnterpriseFolderWithOwaEditPermissionOperationCompleted;
|
||||||
|
|
||||||
private System.Threading.SendOrPostCallback GetStatisticsOperationCompleted;
|
private System.Threading.SendOrPostCallback GetStatisticsOperationCompleted;
|
||||||
|
|
||||||
private System.Threading.SendOrPostCallback GetStatisticsByOrganizationOperationCompleted;
|
private System.Threading.SendOrPostCallback GetStatisticsByOrganizationOperationCompleted;
|
||||||
|
@ -169,6 +179,21 @@ namespace WebsitePanel.EnterpriseServer {
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
public event SetEnterpriseFolderSettingsCompletedEventHandler SetEnterpriseFolderSettingsCompleted;
|
public event SetEnterpriseFolderSettingsCompletedEventHandler SetEnterpriseFolderSettingsCompleted;
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public event SetEnterpriseFolderGeneralSettingsCompletedEventHandler SetEnterpriseFolderGeneralSettingsCompleted;
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public event SetEnterpriseFolderPermissionSettingsCompletedEventHandler SetEnterpriseFolderPermissionSettingsCompleted;
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public event GetFolderOwaAccountsCompletedEventHandler GetFolderOwaAccountsCompleted;
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public event SetFolderOwaAccountsCompletedEventHandler SetFolderOwaAccountsCompleted;
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public event GetUserEnterpriseFolderWithOwaEditPermissionCompletedEventHandler GetUserEnterpriseFolderWithOwaEditPermissionCompleted;
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
public event GetStatisticsCompletedEventHandler GetStatisticsCompleted;
|
public event GetStatisticsCompletedEventHandler GetStatisticsCompleted;
|
||||||
|
|
||||||
|
@ -1223,6 +1248,237 @@ namespace WebsitePanel.EnterpriseServer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetEnterpriseFolderGeneralSettings", 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 void SetEnterpriseFolderGeneralSettings(int itemId, SystemFile folder, bool directoyBrowsingEnabled, int quota, QuotaType quotaType) {
|
||||||
|
this.Invoke("SetEnterpriseFolderGeneralSettings", new object[] {
|
||||||
|
itemId,
|
||||||
|
folder,
|
||||||
|
directoyBrowsingEnabled,
|
||||||
|
quota,
|
||||||
|
quotaType});
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public System.IAsyncResult BeginSetEnterpriseFolderGeneralSettings(int itemId, SystemFile folder, bool directoyBrowsingEnabled, int quota, QuotaType quotaType, System.AsyncCallback callback, object asyncState) {
|
||||||
|
return this.BeginInvoke("SetEnterpriseFolderGeneralSettings", new object[] {
|
||||||
|
itemId,
|
||||||
|
folder,
|
||||||
|
directoyBrowsingEnabled,
|
||||||
|
quota,
|
||||||
|
quotaType}, callback, asyncState);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public void EndSetEnterpriseFolderGeneralSettings(System.IAsyncResult asyncResult) {
|
||||||
|
this.EndInvoke(asyncResult);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public void SetEnterpriseFolderGeneralSettingsAsync(int itemId, SystemFile folder, bool directoyBrowsingEnabled, int quota, QuotaType quotaType) {
|
||||||
|
this.SetEnterpriseFolderGeneralSettingsAsync(itemId, folder, directoyBrowsingEnabled, quota, quotaType, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public void SetEnterpriseFolderGeneralSettingsAsync(int itemId, SystemFile folder, bool directoyBrowsingEnabled, int quota, QuotaType quotaType, object userState) {
|
||||||
|
if ((this.SetEnterpriseFolderGeneralSettingsOperationCompleted == null)) {
|
||||||
|
this.SetEnterpriseFolderGeneralSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetEnterpriseFolderGeneralSettingsOperationCompleted);
|
||||||
|
}
|
||||||
|
this.InvokeAsync("SetEnterpriseFolderGeneralSettings", new object[] {
|
||||||
|
itemId,
|
||||||
|
folder,
|
||||||
|
directoyBrowsingEnabled,
|
||||||
|
quota,
|
||||||
|
quotaType}, this.SetEnterpriseFolderGeneralSettingsOperationCompleted, userState);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnSetEnterpriseFolderGeneralSettingsOperationCompleted(object arg) {
|
||||||
|
if ((this.SetEnterpriseFolderGeneralSettingsCompleted != null)) {
|
||||||
|
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||||
|
this.SetEnterpriseFolderGeneralSettingsCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetEnterpriseFolderPermissionSetting" +
|
||||||
|
"s", 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 void SetEnterpriseFolderPermissionSettings(int itemId, SystemFile folder, ESPermission[] permissions) {
|
||||||
|
this.Invoke("SetEnterpriseFolderPermissionSettings", new object[] {
|
||||||
|
itemId,
|
||||||
|
folder,
|
||||||
|
permissions});
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public System.IAsyncResult BeginSetEnterpriseFolderPermissionSettings(int itemId, SystemFile folder, ESPermission[] permissions, System.AsyncCallback callback, object asyncState) {
|
||||||
|
return this.BeginInvoke("SetEnterpriseFolderPermissionSettings", new object[] {
|
||||||
|
itemId,
|
||||||
|
folder,
|
||||||
|
permissions}, callback, asyncState);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public void EndSetEnterpriseFolderPermissionSettings(System.IAsyncResult asyncResult) {
|
||||||
|
this.EndInvoke(asyncResult);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public void SetEnterpriseFolderPermissionSettingsAsync(int itemId, SystemFile folder, ESPermission[] permissions) {
|
||||||
|
this.SetEnterpriseFolderPermissionSettingsAsync(itemId, folder, permissions, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public void SetEnterpriseFolderPermissionSettingsAsync(int itemId, SystemFile folder, ESPermission[] permissions, object userState) {
|
||||||
|
if ((this.SetEnterpriseFolderPermissionSettingsOperationCompleted == null)) {
|
||||||
|
this.SetEnterpriseFolderPermissionSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetEnterpriseFolderPermissionSettingsOperationCompleted);
|
||||||
|
}
|
||||||
|
this.InvokeAsync("SetEnterpriseFolderPermissionSettings", new object[] {
|
||||||
|
itemId,
|
||||||
|
folder,
|
||||||
|
permissions}, this.SetEnterpriseFolderPermissionSettingsOperationCompleted, userState);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnSetEnterpriseFolderPermissionSettingsOperationCompleted(object arg) {
|
||||||
|
if ((this.SetEnterpriseFolderPermissionSettingsCompleted != null)) {
|
||||||
|
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||||
|
this.SetEnterpriseFolderPermissionSettingsCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetFolderOwaAccounts", 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 OrganizationUser[] GetFolderOwaAccounts(int itemId, SystemFile folder) {
|
||||||
|
object[] results = this.Invoke("GetFolderOwaAccounts", new object[] {
|
||||||
|
itemId,
|
||||||
|
folder});
|
||||||
|
return ((OrganizationUser[])(results[0]));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public System.IAsyncResult BeginGetFolderOwaAccounts(int itemId, SystemFile folder, System.AsyncCallback callback, object asyncState) {
|
||||||
|
return this.BeginInvoke("GetFolderOwaAccounts", new object[] {
|
||||||
|
itemId,
|
||||||
|
folder}, callback, asyncState);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public OrganizationUser[] EndGetFolderOwaAccounts(System.IAsyncResult asyncResult) {
|
||||||
|
object[] results = this.EndInvoke(asyncResult);
|
||||||
|
return ((OrganizationUser[])(results[0]));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public void GetFolderOwaAccountsAsync(int itemId, SystemFile folder) {
|
||||||
|
this.GetFolderOwaAccountsAsync(itemId, folder, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public void GetFolderOwaAccountsAsync(int itemId, SystemFile folder, object userState) {
|
||||||
|
if ((this.GetFolderOwaAccountsOperationCompleted == null)) {
|
||||||
|
this.GetFolderOwaAccountsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetFolderOwaAccountsOperationCompleted);
|
||||||
|
}
|
||||||
|
this.InvokeAsync("GetFolderOwaAccounts", new object[] {
|
||||||
|
itemId,
|
||||||
|
folder}, this.GetFolderOwaAccountsOperationCompleted, userState);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnGetFolderOwaAccountsOperationCompleted(object arg) {
|
||||||
|
if ((this.GetFolderOwaAccountsCompleted != null)) {
|
||||||
|
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||||
|
this.GetFolderOwaAccountsCompleted(this, new GetFolderOwaAccountsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetFolderOwaAccounts", 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 void SetFolderOwaAccounts(int itemId, SystemFile folder, OrganizationUser[] users) {
|
||||||
|
this.Invoke("SetFolderOwaAccounts", new object[] {
|
||||||
|
itemId,
|
||||||
|
folder,
|
||||||
|
users});
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public System.IAsyncResult BeginSetFolderOwaAccounts(int itemId, SystemFile folder, OrganizationUser[] users, System.AsyncCallback callback, object asyncState) {
|
||||||
|
return this.BeginInvoke("SetFolderOwaAccounts", new object[] {
|
||||||
|
itemId,
|
||||||
|
folder,
|
||||||
|
users}, callback, asyncState);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public void EndSetFolderOwaAccounts(System.IAsyncResult asyncResult) {
|
||||||
|
this.EndInvoke(asyncResult);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public void SetFolderOwaAccountsAsync(int itemId, SystemFile folder, OrganizationUser[] users) {
|
||||||
|
this.SetFolderOwaAccountsAsync(itemId, folder, users, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public void SetFolderOwaAccountsAsync(int itemId, SystemFile folder, OrganizationUser[] users, object userState) {
|
||||||
|
if ((this.SetFolderOwaAccountsOperationCompleted == null)) {
|
||||||
|
this.SetFolderOwaAccountsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetFolderOwaAccountsOperationCompleted);
|
||||||
|
}
|
||||||
|
this.InvokeAsync("SetFolderOwaAccounts", new object[] {
|
||||||
|
itemId,
|
||||||
|
folder,
|
||||||
|
users}, this.SetFolderOwaAccountsOperationCompleted, userState);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnSetFolderOwaAccountsOperationCompleted(object arg) {
|
||||||
|
if ((this.SetFolderOwaAccountsCompleted != null)) {
|
||||||
|
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||||
|
this.SetFolderOwaAccountsCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetUserEnterpriseFolderWithOwaEditPe" +
|
||||||
|
"rmission", 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 string[] GetUserEnterpriseFolderWithOwaEditPermission(int itemId, int[] accountIds) {
|
||||||
|
object[] results = this.Invoke("GetUserEnterpriseFolderWithOwaEditPermission", new object[] {
|
||||||
|
itemId,
|
||||||
|
accountIds});
|
||||||
|
return ((string[])(results[0]));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public System.IAsyncResult BeginGetUserEnterpriseFolderWithOwaEditPermission(int itemId, int[] accountIds, System.AsyncCallback callback, object asyncState) {
|
||||||
|
return this.BeginInvoke("GetUserEnterpriseFolderWithOwaEditPermission", new object[] {
|
||||||
|
itemId,
|
||||||
|
accountIds}, callback, asyncState);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public string[] EndGetUserEnterpriseFolderWithOwaEditPermission(System.IAsyncResult asyncResult) {
|
||||||
|
object[] results = this.EndInvoke(asyncResult);
|
||||||
|
return ((string[])(results[0]));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public void GetUserEnterpriseFolderWithOwaEditPermissionAsync(int itemId, int[] accountIds) {
|
||||||
|
this.GetUserEnterpriseFolderWithOwaEditPermissionAsync(itemId, accountIds, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public void GetUserEnterpriseFolderWithOwaEditPermissionAsync(int itemId, int[] accountIds, object userState) {
|
||||||
|
if ((this.GetUserEnterpriseFolderWithOwaEditPermissionOperationCompleted == null)) {
|
||||||
|
this.GetUserEnterpriseFolderWithOwaEditPermissionOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetUserEnterpriseFolderWithOwaEditPermissionOperationCompleted);
|
||||||
|
}
|
||||||
|
this.InvokeAsync("GetUserEnterpriseFolderWithOwaEditPermission", new object[] {
|
||||||
|
itemId,
|
||||||
|
accountIds}, this.GetUserEnterpriseFolderWithOwaEditPermissionOperationCompleted, userState);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnGetUserEnterpriseFolderWithOwaEditPermissionOperationCompleted(object arg) {
|
||||||
|
if ((this.GetUserEnterpriseFolderWithOwaEditPermissionCompleted != null)) {
|
||||||
|
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||||
|
this.GetUserEnterpriseFolderWithOwaEditPermissionCompleted(this, new GetUserEnterpriseFolderWithOwaEditPermissionCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetStatistics", 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/GetStatistics", 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 OrganizationStatistics GetStatistics(int itemId) {
|
public OrganizationStatistics GetStatistics(int itemId) {
|
||||||
|
@ -2053,6 +2309,70 @@ namespace WebsitePanel.EnterpriseServer {
|
||||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||||
public delegate void SetEnterpriseFolderSettingsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
|
public delegate void SetEnterpriseFolderSettingsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||||
|
public delegate void SetEnterpriseFolderGeneralSettingsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||||
|
public delegate void SetEnterpriseFolderPermissionSettingsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||||
|
public delegate void GetFolderOwaAccountsCompletedEventHandler(object sender, GetFolderOwaAccountsCompletedEventArgs e);
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||||
|
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||||
|
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||||
|
public partial class GetFolderOwaAccountsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||||
|
|
||||||
|
private object[] results;
|
||||||
|
|
||||||
|
internal GetFolderOwaAccountsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||||
|
base(exception, cancelled, userState) {
|
||||||
|
this.results = results;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public OrganizationUser[] Result {
|
||||||
|
get {
|
||||||
|
this.RaiseExceptionIfNecessary();
|
||||||
|
return ((OrganizationUser[])(this.results[0]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||||
|
public delegate void SetFolderOwaAccountsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||||
|
public delegate void GetUserEnterpriseFolderWithOwaEditPermissionCompletedEventHandler(object sender, GetUserEnterpriseFolderWithOwaEditPermissionCompletedEventArgs e);
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||||
|
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||||
|
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||||
|
public partial class GetUserEnterpriseFolderWithOwaEditPermissionCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||||
|
|
||||||
|
private object[] results;
|
||||||
|
|
||||||
|
internal GetUserEnterpriseFolderWithOwaEditPermissionCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||||
|
base(exception, cancelled, userState) {
|
||||||
|
this.results = results;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public string[] Result {
|
||||||
|
get {
|
||||||
|
this.RaiseExceptionIfNecessary();
|
||||||
|
return ((string[])(this.results[0]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||||
public delegate void GetStatisticsCompletedEventHandler(object sender, GetStatisticsCompletedEventArgs e);
|
public delegate void GetStatisticsCompletedEventHandler(object sender, GetStatisticsCompletedEventArgs e);
|
||||||
|
|
|
@ -120,6 +120,12 @@ namespace WebsitePanel.EnterpriseServer {
|
||||||
|
|
||||||
private System.Threading.SendOrPostCallback InstallSessionHostsCertificateOperationCompleted;
|
private System.Threading.SendOrPostCallback InstallSessionHostsCertificateOperationCompleted;
|
||||||
|
|
||||||
|
private System.Threading.SendOrPostCallback GetRdsCertificateByServiceIdOperationCompleted;
|
||||||
|
|
||||||
|
private System.Threading.SendOrPostCallback GetRdsCertificateByItemIdOperationCompleted;
|
||||||
|
|
||||||
|
private System.Threading.SendOrPostCallback AddRdsCertificateOperationCompleted;
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
public esRemoteDesktopServices() {
|
public esRemoteDesktopServices() {
|
||||||
this.Url = "http://localhost:9002/esRemoteDesktopServices.asmx";
|
this.Url = "http://localhost:9002/esRemoteDesktopServices.asmx";
|
||||||
|
@ -260,6 +266,15 @@ namespace WebsitePanel.EnterpriseServer {
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
public event InstallSessionHostsCertificateCompletedEventHandler InstallSessionHostsCertificateCompleted;
|
public event InstallSessionHostsCertificateCompletedEventHandler InstallSessionHostsCertificateCompleted;
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public event GetRdsCertificateByServiceIdCompletedEventHandler GetRdsCertificateByServiceIdCompleted;
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public event GetRdsCertificateByItemIdCompletedEventHandler GetRdsCertificateByItemIdCompleted;
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public event AddRdsCertificateCompletedEventHandler AddRdsCertificateCompleted;
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetRdsCollection", 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/GetRdsCollection", 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 RdsCollection GetRdsCollection(int collectionId) {
|
public RdsCollection GetRdsCollection(int collectionId) {
|
||||||
|
@ -2245,20 +2260,16 @@ namespace WebsitePanel.EnterpriseServer {
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/InstallSessionHostsCertificate", 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/InstallSessionHostsCertificate", 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 ResultObject InstallSessionHostsCertificate(int collectionId, [System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary")] byte[] certificate, string password) {
|
public ResultObject InstallSessionHostsCertificate(RdsServer rdsServer) {
|
||||||
object[] results = this.Invoke("InstallSessionHostsCertificate", new object[] {
|
object[] results = this.Invoke("InstallSessionHostsCertificate", new object[] {
|
||||||
collectionId,
|
rdsServer});
|
||||||
certificate,
|
|
||||||
password});
|
|
||||||
return ((ResultObject)(results[0]));
|
return ((ResultObject)(results[0]));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
public System.IAsyncResult BeginInstallSessionHostsCertificate(int collectionId, byte[] certificate, string password, System.AsyncCallback callback, object asyncState) {
|
public System.IAsyncResult BeginInstallSessionHostsCertificate(RdsServer rdsServer, System.AsyncCallback callback, object asyncState) {
|
||||||
return this.BeginInvoke("InstallSessionHostsCertificate", new object[] {
|
return this.BeginInvoke("InstallSessionHostsCertificate", new object[] {
|
||||||
collectionId,
|
rdsServer}, callback, asyncState);
|
||||||
certificate,
|
|
||||||
password}, callback, asyncState);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
|
@ -2268,19 +2279,17 @@ namespace WebsitePanel.EnterpriseServer {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
public void InstallSessionHostsCertificateAsync(int collectionId, byte[] certificate, string password) {
|
public void InstallSessionHostsCertificateAsync(RdsServer rdsServer) {
|
||||||
this.InstallSessionHostsCertificateAsync(collectionId, certificate, password, null);
|
this.InstallSessionHostsCertificateAsync(rdsServer, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
public void InstallSessionHostsCertificateAsync(int collectionId, byte[] certificate, string password, object userState) {
|
public void InstallSessionHostsCertificateAsync(RdsServer rdsServer, object userState) {
|
||||||
if ((this.InstallSessionHostsCertificateOperationCompleted == null)) {
|
if ((this.InstallSessionHostsCertificateOperationCompleted == null)) {
|
||||||
this.InstallSessionHostsCertificateOperationCompleted = new System.Threading.SendOrPostCallback(this.OnInstallSessionHostsCertificateOperationCompleted);
|
this.InstallSessionHostsCertificateOperationCompleted = new System.Threading.SendOrPostCallback(this.OnInstallSessionHostsCertificateOperationCompleted);
|
||||||
}
|
}
|
||||||
this.InvokeAsync("InstallSessionHostsCertificate", new object[] {
|
this.InvokeAsync("InstallSessionHostsCertificate", new object[] {
|
||||||
collectionId,
|
rdsServer}, this.InstallSessionHostsCertificateOperationCompleted, userState);
|
||||||
certificate,
|
|
||||||
password}, this.InstallSessionHostsCertificateOperationCompleted, userState);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnInstallSessionHostsCertificateOperationCompleted(object arg) {
|
private void OnInstallSessionHostsCertificateOperationCompleted(object arg) {
|
||||||
|
@ -2290,6 +2299,129 @@ namespace WebsitePanel.EnterpriseServer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetRdsCertificateByServiceId", 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 RdsCertificate GetRdsCertificateByServiceId(int serviceId) {
|
||||||
|
object[] results = this.Invoke("GetRdsCertificateByServiceId", new object[] {
|
||||||
|
serviceId});
|
||||||
|
return ((RdsCertificate)(results[0]));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public System.IAsyncResult BeginGetRdsCertificateByServiceId(int serviceId, System.AsyncCallback callback, object asyncState) {
|
||||||
|
return this.BeginInvoke("GetRdsCertificateByServiceId", new object[] {
|
||||||
|
serviceId}, callback, asyncState);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public RdsCertificate EndGetRdsCertificateByServiceId(System.IAsyncResult asyncResult) {
|
||||||
|
object[] results = this.EndInvoke(asyncResult);
|
||||||
|
return ((RdsCertificate)(results[0]));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public void GetRdsCertificateByServiceIdAsync(int serviceId) {
|
||||||
|
this.GetRdsCertificateByServiceIdAsync(serviceId, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public void GetRdsCertificateByServiceIdAsync(int serviceId, object userState) {
|
||||||
|
if ((this.GetRdsCertificateByServiceIdOperationCompleted == null)) {
|
||||||
|
this.GetRdsCertificateByServiceIdOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetRdsCertificateByServiceIdOperationCompleted);
|
||||||
|
}
|
||||||
|
this.InvokeAsync("GetRdsCertificateByServiceId", new object[] {
|
||||||
|
serviceId}, this.GetRdsCertificateByServiceIdOperationCompleted, userState);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnGetRdsCertificateByServiceIdOperationCompleted(object arg) {
|
||||||
|
if ((this.GetRdsCertificateByServiceIdCompleted != null)) {
|
||||||
|
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||||
|
this.GetRdsCertificateByServiceIdCompleted(this, new GetRdsCertificateByServiceIdCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetRdsCertificateByItemId", 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 RdsCertificate GetRdsCertificateByItemId(int itemId) {
|
||||||
|
object[] results = this.Invoke("GetRdsCertificateByItemId", new object[] {
|
||||||
|
itemId});
|
||||||
|
return ((RdsCertificate)(results[0]));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public System.IAsyncResult BeginGetRdsCertificateByItemId(int itemId, System.AsyncCallback callback, object asyncState) {
|
||||||
|
return this.BeginInvoke("GetRdsCertificateByItemId", new object[] {
|
||||||
|
itemId}, callback, asyncState);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public RdsCertificate EndGetRdsCertificateByItemId(System.IAsyncResult asyncResult) {
|
||||||
|
object[] results = this.EndInvoke(asyncResult);
|
||||||
|
return ((RdsCertificate)(results[0]));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public void GetRdsCertificateByItemIdAsync(int itemId) {
|
||||||
|
this.GetRdsCertificateByItemIdAsync(itemId, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public void GetRdsCertificateByItemIdAsync(int itemId, object userState) {
|
||||||
|
if ((this.GetRdsCertificateByItemIdOperationCompleted == null)) {
|
||||||
|
this.GetRdsCertificateByItemIdOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetRdsCertificateByItemIdOperationCompleted);
|
||||||
|
}
|
||||||
|
this.InvokeAsync("GetRdsCertificateByItemId", new object[] {
|
||||||
|
itemId}, this.GetRdsCertificateByItemIdOperationCompleted, userState);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnGetRdsCertificateByItemIdOperationCompleted(object arg) {
|
||||||
|
if ((this.GetRdsCertificateByItemIdCompleted != null)) {
|
||||||
|
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||||
|
this.GetRdsCertificateByItemIdCompleted(this, new GetRdsCertificateByItemIdCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddRdsCertificate", 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 ResultObject AddRdsCertificate(RdsCertificate certificate) {
|
||||||
|
object[] results = this.Invoke("AddRdsCertificate", new object[] {
|
||||||
|
certificate});
|
||||||
|
return ((ResultObject)(results[0]));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public System.IAsyncResult BeginAddRdsCertificate(RdsCertificate certificate, System.AsyncCallback callback, object asyncState) {
|
||||||
|
return this.BeginInvoke("AddRdsCertificate", new object[] {
|
||||||
|
certificate}, callback, asyncState);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public ResultObject EndAddRdsCertificate(System.IAsyncResult asyncResult) {
|
||||||
|
object[] results = this.EndInvoke(asyncResult);
|
||||||
|
return ((ResultObject)(results[0]));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public void AddRdsCertificateAsync(RdsCertificate certificate) {
|
||||||
|
this.AddRdsCertificateAsync(certificate, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public void AddRdsCertificateAsync(RdsCertificate certificate, object userState) {
|
||||||
|
if ((this.AddRdsCertificateOperationCompleted == null)) {
|
||||||
|
this.AddRdsCertificateOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddRdsCertificateOperationCompleted);
|
||||||
|
}
|
||||||
|
this.InvokeAsync("AddRdsCertificate", new object[] {
|
||||||
|
certificate}, this.AddRdsCertificateOperationCompleted, userState);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnAddRdsCertificateOperationCompleted(object arg) {
|
||||||
|
if ((this.AddRdsCertificateCompleted != null)) {
|
||||||
|
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||||
|
this.AddRdsCertificateCompleted(this, new AddRdsCertificateCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
public new void CancelAsync(object userState) {
|
public new void CancelAsync(object userState) {
|
||||||
base.CancelAsync(userState);
|
base.CancelAsync(userState);
|
||||||
|
@ -3465,4 +3597,82 @@ namespace WebsitePanel.EnterpriseServer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||||
|
public delegate void GetRdsCertificateByServiceIdCompletedEventHandler(object sender, GetRdsCertificateByServiceIdCompletedEventArgs e);
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||||
|
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||||
|
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||||
|
public partial class GetRdsCertificateByServiceIdCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||||
|
|
||||||
|
private object[] results;
|
||||||
|
|
||||||
|
internal GetRdsCertificateByServiceIdCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||||
|
base(exception, cancelled, userState) {
|
||||||
|
this.results = results;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public RdsCertificate Result {
|
||||||
|
get {
|
||||||
|
this.RaiseExceptionIfNecessary();
|
||||||
|
return ((RdsCertificate)(this.results[0]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||||
|
public delegate void GetRdsCertificateByItemIdCompletedEventHandler(object sender, GetRdsCertificateByItemIdCompletedEventArgs e);
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||||
|
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||||
|
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||||
|
public partial class GetRdsCertificateByItemIdCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||||
|
|
||||||
|
private object[] results;
|
||||||
|
|
||||||
|
internal GetRdsCertificateByItemIdCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||||
|
base(exception, cancelled, userState) {
|
||||||
|
this.results = results;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public RdsCertificate Result {
|
||||||
|
get {
|
||||||
|
this.RaiseExceptionIfNecessary();
|
||||||
|
return ((RdsCertificate)(this.results[0]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||||
|
public delegate void AddRdsCertificateCompletedEventHandler(object sender, AddRdsCertificateCompletedEventArgs e);
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||||
|
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||||
|
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||||
|
public partial class AddRdsCertificateCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||||
|
|
||||||
|
private object[] results;
|
||||||
|
|
||||||
|
internal AddRdsCertificateCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||||
|
base(exception, cancelled, userState) {
|
||||||
|
this.results = results;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public ResultObject Result {
|
||||||
|
get {
|
||||||
|
this.RaiseExceptionIfNecessary();
|
||||||
|
return ((ResultObject)(this.results[0]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4543,6 +4543,69 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void DeleteAllEnterpriseFolderOwaUsers(int itemId, int folderId)
|
||||||
|
{
|
||||||
|
SqlHelper.ExecuteNonQuery(
|
||||||
|
ConnectionString,
|
||||||
|
CommandType.StoredProcedure,
|
||||||
|
"DeleteAllEnterpriseFolderOwaUsers",
|
||||||
|
new SqlParameter("@ItemID", itemId),
|
||||||
|
new SqlParameter("@FolderID", folderId)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int AddEnterpriseFolderOwaUser(int itemId, int folderId, int accountId)
|
||||||
|
{
|
||||||
|
SqlParameter id = new SqlParameter("@ESOwsaUserId", SqlDbType.Int);
|
||||||
|
id.Direction = ParameterDirection.Output;
|
||||||
|
|
||||||
|
SqlHelper.ExecuteNonQuery(
|
||||||
|
ConnectionString,
|
||||||
|
CommandType.StoredProcedure,
|
||||||
|
"AddEnterpriseFolderOwaUser",
|
||||||
|
id,
|
||||||
|
new SqlParameter("@ItemID", itemId),
|
||||||
|
new SqlParameter("@FolderID", folderId),
|
||||||
|
new SqlParameter("@AccountId", accountId)
|
||||||
|
);
|
||||||
|
|
||||||
|
// read identity
|
||||||
|
return Convert.ToInt32(id.Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IDataReader GetEnterpriseFolderOwaUsers(int itemId, int folderId)
|
||||||
|
{
|
||||||
|
return SqlHelper.ExecuteReader(
|
||||||
|
ConnectionString,
|
||||||
|
CommandType.StoredProcedure,
|
||||||
|
"GetEnterpriseFolderOwaUsers",
|
||||||
|
new SqlParameter("@ItemID", itemId),
|
||||||
|
new SqlParameter("@FolderID", folderId)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IDataReader GetEnterpriseFolderId(int itemId, string folderName)
|
||||||
|
{
|
||||||
|
return SqlHelper.ExecuteReader(
|
||||||
|
ConnectionString,
|
||||||
|
CommandType.StoredProcedure,
|
||||||
|
"GetEnterpriseFolderId",
|
||||||
|
new SqlParameter("@ItemID", itemId),
|
||||||
|
new SqlParameter("@FolderName", folderName)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IDataReader GetUserEnterpriseFolderWithOwaEditPermission(int itemId, int accountId)
|
||||||
|
{
|
||||||
|
return SqlHelper.ExecuteReader(
|
||||||
|
ConnectionString,
|
||||||
|
CommandType.StoredProcedure,
|
||||||
|
"GetUserEnterpriseFolderWithOwaEditPermission",
|
||||||
|
new SqlParameter("@ItemID", itemId),
|
||||||
|
new SqlParameter("@AccountID", accountId)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Support Service Levels
|
#region Support Service Levels
|
||||||
|
@ -4613,6 +4676,37 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
|
|
||||||
#region RDS
|
#region RDS
|
||||||
|
|
||||||
|
public static int AddRdsCertificate(int serviceId, string content, byte[] hash, string fileName, DateTime? validFrom, DateTime? expiryDate)
|
||||||
|
{
|
||||||
|
SqlParameter rdsCertificateId = new SqlParameter("@RDSCertificateID", SqlDbType.Int);
|
||||||
|
rdsCertificateId.Direction = ParameterDirection.Output;
|
||||||
|
|
||||||
|
SqlHelper.ExecuteNonQuery(
|
||||||
|
ConnectionString,
|
||||||
|
CommandType.StoredProcedure,
|
||||||
|
"AddRDSCertificate",
|
||||||
|
rdsCertificateId,
|
||||||
|
new SqlParameter("@ServiceId", serviceId),
|
||||||
|
new SqlParameter("@Content", content),
|
||||||
|
new SqlParameter("@Hash", Convert.ToBase64String(hash)),
|
||||||
|
new SqlParameter("@FileName", fileName),
|
||||||
|
new SqlParameter("@ValidFrom", validFrom),
|
||||||
|
new SqlParameter("@ExpiryDate", expiryDate)
|
||||||
|
);
|
||||||
|
|
||||||
|
return Convert.ToInt32(rdsCertificateId.Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IDataReader GetRdsCertificateByServiceId(int serviceId)
|
||||||
|
{
|
||||||
|
return SqlHelper.ExecuteReader(
|
||||||
|
ConnectionString,
|
||||||
|
CommandType.StoredProcedure,
|
||||||
|
"GetRDSCertificateByServiceId",
|
||||||
|
new SqlParameter("@ServiceId", serviceId)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
public static IDataReader GetRdsCollectionSettingsByCollectionId(int collectionId)
|
public static IDataReader GetRdsCollectionSettingsByCollectionId(int collectionId)
|
||||||
{
|
{
|
||||||
return SqlHelper.ExecuteReader(
|
return SqlHelper.ExecuteReader(
|
||||||
|
|
|
@ -32,6 +32,7 @@ using System.Collections.Specialized;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
|
using System.Text;
|
||||||
using System.Xml.Serialization;
|
using System.Xml.Serialization;
|
||||||
using WebsitePanel.Providers;
|
using WebsitePanel.Providers;
|
||||||
using WebsitePanel.Providers.DNS;
|
using WebsitePanel.Providers.DNS;
|
||||||
|
@ -385,7 +386,9 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
var idn = new IdnMapping();
|
var idn = new IdnMapping();
|
||||||
|
|
||||||
if (itemType == typeof(DnsZone))
|
if (itemType == typeof(DnsZone))
|
||||||
items.AddRange(dns.GetZones().Select(z => idn.GetUnicode(z)));
|
items.AddRange(dns.GetZones().Select(z =>
|
||||||
|
Encoding.UTF8.GetByteCount(z) == z.Length ? // IsASCII
|
||||||
|
idn.GetUnicode(z) : z ));
|
||||||
|
|
||||||
return items;
|
return items;
|
||||||
}
|
}
|
||||||
|
|
|
@ -152,6 +152,16 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
StartESBackgroundTaskInternal("SET_ENTERPRISE_FOLDER_SETTINGS", itemId, folder, permissions, directoyBrowsingEnabled, quota, quotaType);
|
StartESBackgroundTaskInternal("SET_ENTERPRISE_FOLDER_SETTINGS", itemId, folder, permissions, directoyBrowsingEnabled, quota, quotaType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void SetESGeneralSettings(int itemId, SystemFile folder, bool directoyBrowsingEnabled, int quota, QuotaType quotaType)
|
||||||
|
{
|
||||||
|
SetESGeneralSettingsInternal("SET_ENTERPRISE_FOLDER_GENERAL_SETTINGS", itemId, folder, directoyBrowsingEnabled, quota, quotaType);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void SetESFolderPermissionSettings(int itemId, SystemFile folder, ESPermission[] permissions)
|
||||||
|
{
|
||||||
|
SetESFolderPermissionSettingsInternal("SET_ENTERPRISE_FOLDER_GENERAL_SETTINGS", itemId, folder, permissions);
|
||||||
|
}
|
||||||
|
|
||||||
public static int AddWebDavAccessToken(WebDavAccessToken accessToken)
|
public static int AddWebDavAccessToken(WebDavAccessToken accessToken)
|
||||||
{
|
{
|
||||||
return DataProvider.AddWebDavAccessToken(accessToken);
|
return DataProvider.AddWebDavAccessToken(accessToken);
|
||||||
|
@ -257,6 +267,69 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
return rootFolders;
|
return rootFolders;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected static void SetESGeneralSettingsInternal(string taskName, int itemId, SystemFile folder, bool directoyBrowsingEnabled, int quota, QuotaType quotaType)
|
||||||
|
{
|
||||||
|
// load organization
|
||||||
|
var org = OrganizationController.GetOrganization(itemId);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
TaskManager.StartTask("ENTERPRISE_STORAGE", taskName, org.PackageId);
|
||||||
|
|
||||||
|
EnterpriseStorageController.SetFRSMQuotaOnFolder(itemId, folder.Name, quota, quotaType);
|
||||||
|
EnterpriseStorageController.SetDirectoryBrowseEnabled(itemId, folder.Url, directoyBrowsingEnabled);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
// log error
|
||||||
|
TaskManager.WriteError(ex, "Error executing enterprise storage background task");
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
// complete task
|
||||||
|
try
|
||||||
|
{
|
||||||
|
TaskManager.CompleteTask();
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected static void SetESFolderPermissionSettingsInternal(string taskName, int itemId, SystemFile folder, ESPermission[] permissions)
|
||||||
|
{
|
||||||
|
// load organization
|
||||||
|
var org = OrganizationController.GetOrganization(itemId);
|
||||||
|
|
||||||
|
new Thread(() =>
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
TaskManager.StartTask("ENTERPRISE_STORAGE", taskName, org.PackageId);
|
||||||
|
|
||||||
|
EnterpriseStorageController.SetFolderPermission(itemId, folder.Name, permissions);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
// log error
|
||||||
|
TaskManager.WriteError(ex, "Error executing enterprise storage background task");
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
// complete task
|
||||||
|
try
|
||||||
|
{
|
||||||
|
TaskManager.CompleteTask();
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}).Start();
|
||||||
|
}
|
||||||
|
|
||||||
protected static void StartESBackgroundTaskInternal(string taskName, int itemId, SystemFile folder, ESPermission[] permissions, bool directoyBrowsingEnabled, int quota, QuotaType quotaType)
|
protected static void StartESBackgroundTaskInternal(string taskName, int itemId, SystemFile folder, ESPermission[] permissions, bool directoyBrowsingEnabled, int quota, QuotaType quotaType)
|
||||||
{
|
{
|
||||||
// load organization
|
// load organization
|
||||||
|
@ -1265,6 +1338,87 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static OrganizationUser[] GetFolderOwaAccounts(int itemId, string folderName)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var folderId = GetFolderId(itemId, folderName);
|
||||||
|
|
||||||
|
var users = ObjectUtils.CreateListFromDataReader<OrganizationUser>(DataProvider.GetEnterpriseFolderOwaUsers(itemId, folderId));
|
||||||
|
|
||||||
|
return users.ToArray();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw ex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void SetFolderOwaAccounts(int itemId, string folderName, OrganizationUser[] users)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var folderId = GetFolderId(itemId, folderName);
|
||||||
|
|
||||||
|
DataProvider.DeleteAllEnterpriseFolderOwaUsers(itemId, folderId);
|
||||||
|
|
||||||
|
foreach (var user in users)
|
||||||
|
{
|
||||||
|
DataProvider.AddEnterpriseFolderOwaUser(itemId, folderId, user.AccountId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw ex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected static int GetFolderId(int itemId, string folderName)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
GetFolder(itemId, folderName);
|
||||||
|
|
||||||
|
var dataReader = DataProvider.GetEnterpriseFolderId(itemId, folderName);
|
||||||
|
|
||||||
|
while (dataReader.Read())
|
||||||
|
{
|
||||||
|
return (int)dataReader[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw ex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static List<string> GetUserEnterpriseFolderWithOwaEditPermission(int itemId, List<int> accountIds)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var result = new List<string>();
|
||||||
|
|
||||||
|
|
||||||
|
foreach (var accountId in accountIds)
|
||||||
|
{
|
||||||
|
var reader = DataProvider.GetUserEnterpriseFolderWithOwaEditPermission(itemId, accountId);
|
||||||
|
|
||||||
|
while (reader.Read())
|
||||||
|
{
|
||||||
|
result.Add(Convert.ToString(reader["FolderName"]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return result.Distinct().ToList();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw ex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#region WebDav portal
|
#region WebDav portal
|
||||||
|
|
||||||
public static string GetWebDavPortalUserSettingsByAccountId(int accountId)
|
public static string GetWebDavPortalUserSettingsByAccountId(int accountId)
|
||||||
|
|
|
@ -278,19 +278,33 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
return SaveRdsCollectionLocalAdminsInternal(users, collectionId);
|
return SaveRdsCollectionLocalAdminsInternal(users, collectionId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ResultObject InstallSessionHostsCertificate(int collectionId, byte[] certificate, string password)
|
public static ResultObject InstallSessionHostsCertificate(RdsServer rdsServer)
|
||||||
{
|
{
|
||||||
return InstallSessionHostsCertificateInternal(collectionId, certificate, password);
|
return InstallSessionHostsCertificateInternal(rdsServer);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ResultObject InstallSessionHostsCertificateInternal(int collectionId, byte[] certificate, string password)
|
public static RdsCertificate GetRdsCertificateByServiceId(int serviceId)
|
||||||
|
{
|
||||||
|
return GetRdsCertificateByServiceIdInternal(serviceId);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static RdsCertificate GetRdsCertificateByItemId(int itemId)
|
||||||
|
{
|
||||||
|
return GetRdsCertificateByItemIdInternal(itemId);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ResultObject AddRdsCertificate(RdsCertificate certificate)
|
||||||
|
{
|
||||||
|
return AddRdsCertificateInternal(certificate);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static ResultObject InstallSessionHostsCertificateInternal(RdsServer rdsServer)
|
||||||
{
|
{
|
||||||
var result = TaskManager.StartResultTask<ResultObject>("REMOTE_DESKTOP_SERVICES", "INSTALL_CERTIFICATE");
|
var result = TaskManager.StartResultTask<ResultObject>("REMOTE_DESKTOP_SERVICES", "INSTALL_CERTIFICATE");
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var collection = ObjectUtils.FillObjectFromDataReader<RdsCollection>(DataProvider.GetRDSCollectionById(collectionId));
|
Organization org = OrganizationController.GetOrganization(rdsServer.ItemId.Value);
|
||||||
Organization org = OrganizationController.GetOrganization(collection.ItemId);
|
|
||||||
|
|
||||||
if (org == null)
|
if (org == null)
|
||||||
{
|
{
|
||||||
|
@ -299,10 +313,17 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
var rds = GetRemoteDesktopServices(GetRemoteDesktopServiceID(org.PackageId));
|
int serviceId = GetRemoteDesktopServiceID(org.PackageId);
|
||||||
var servers = ObjectUtils.CreateListFromDataReader<RdsServer>(DataProvider.GetRDSServersByCollectionId(collection.Id)).ToList();
|
var rds = GetRemoteDesktopServices(serviceId);
|
||||||
|
var certificate = GetRdsCertificateByServiceIdInternal(serviceId);
|
||||||
|
|
||||||
|
var array = Convert.FromBase64String(certificate.Hash);
|
||||||
|
char[] chars = new char[array.Length / sizeof(char)];
|
||||||
|
System.Buffer.BlockCopy(array, 0, chars, 0, array.Length);
|
||||||
|
string password = new string(chars);
|
||||||
|
byte[] content = Convert.FromBase64String(certificate.Content);
|
||||||
|
|
||||||
rds.InstallCertificate(certificate, password, servers.Select(s => s.FqdName).ToArray());
|
rds.InstallCertificate(content, password, new string[] {rdsServer.FqdName});
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
@ -323,6 +344,64 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static RdsCertificate GetRdsCertificateByServiceIdInternal(int serviceId)
|
||||||
|
{
|
||||||
|
var result = ObjectUtils.FillObjectFromDataReader<RdsCertificate>(DataProvider.GetRdsCertificateByServiceId(serviceId));
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static RdsCertificate GetRdsCertificateByItemIdInternal(int itemId)
|
||||||
|
{
|
||||||
|
Organization org = OrganizationController.GetOrganization(itemId);
|
||||||
|
|
||||||
|
if (org == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
int serviceId = GetRemoteDesktopServiceID(org.PackageId);
|
||||||
|
var result = ObjectUtils.FillObjectFromDataReader<RdsCertificate>(DataProvider.GetRdsCertificateByServiceId(serviceId));
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static ResultObject AddRdsCertificateInternal(RdsCertificate certificate)
|
||||||
|
{
|
||||||
|
var result = TaskManager.StartResultTask<ResultObject>("REMOTE_DESKTOP_SERVICES", "ADD_RDS_SERVER");
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
byte[] hash = new byte[certificate.Hash.Length * sizeof(char)];
|
||||||
|
System.Buffer.BlockCopy(certificate.Hash.ToCharArray(), 0, hash, 0, hash.Length);
|
||||||
|
certificate.Id = DataProvider.AddRdsCertificate(certificate.ServiceId, certificate.Content, hash, certificate.FileName, certificate.ValidFrom, certificate.ExpiryDate);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
if (ex.InnerException != null)
|
||||||
|
{
|
||||||
|
result.AddError("Unable to add RDS Certificate", ex.InnerException);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result.AddError("Unable to add RDS Certificate", ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
if (!result.IsSuccess)
|
||||||
|
{
|
||||||
|
TaskManager.CompleteResultTask(result);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
TaskManager.CompleteResultTask();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
private static RdsCollection GetRdsCollectionInternal(int collectionId)
|
private static RdsCollection GetRdsCollectionInternal(int collectionId)
|
||||||
{
|
{
|
||||||
var collection = ObjectUtils.FillObjectFromDataReader<RdsCollection>(DataProvider.GetRDSCollectionById(collectionId));
|
var collection = ObjectUtils.FillObjectFromDataReader<RdsCollection>(DataProvider.GetRDSCollectionById(collectionId));
|
||||||
|
@ -370,9 +449,9 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
var rds = GetRemoteDesktopServices(GetRemoteDesktopServiceID(org.PackageId));
|
var rds = GetRemoteDesktopServices(GetRemoteDesktopServiceID(org.PackageId));
|
||||||
|
|
||||||
var organizationUsers = OrganizationController.GetOrganizationUsersPaged(collection.ItemId, null, null, null, 0, Int32.MaxValue).PageUsers;
|
var organizationUsers = OrganizationController.GetOrganizationUsersPaged(collection.ItemId, null, null, null, 0, Int32.MaxValue).PageUsers;
|
||||||
var organizationAdmins = rds.GetRdsCollectionLocalAdmins(servers.First().FqdName);
|
var organizationAdmins = rds.GetRdsCollectionLocalAdmins(org.OrganizationId, collection.Name);
|
||||||
|
|
||||||
return organizationUsers.Where(o => organizationAdmins.Select(a => a.ToLower()).Contains(o.DomainUserName.ToLower())).ToList();
|
return organizationUsers.Where(o => organizationAdmins.Select(a => a.ToLower()).Contains(o.SamAccountName.ToLower())).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ResultObject SaveRdsCollectionLocalAdminsInternal(OrganizationUser[] users, int collectionId)
|
private static ResultObject SaveRdsCollectionLocalAdminsInternal(OrganizationUser[] users, int collectionId)
|
||||||
|
@ -394,7 +473,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
var rds = GetRemoteDesktopServices(GetRemoteDesktopServiceID(org.PackageId));
|
var rds = GetRemoteDesktopServices(GetRemoteDesktopServiceID(org.PackageId));
|
||||||
var servers = ObjectUtils.CreateListFromDataReader<RdsServer>(DataProvider.GetRDSServersByCollectionId(collection.Id)).ToList();
|
var servers = ObjectUtils.CreateListFromDataReader<RdsServer>(DataProvider.GetRDSServersByCollectionId(collection.Id)).ToList();
|
||||||
|
|
||||||
rds.SaveRdsCollectionLocalAdmins(users, servers.Select(s => s.FqdName).ToArray());
|
rds.SaveRdsCollectionLocalAdmins(users.Select(u => u.AccountName).ToArray(), servers.Select(s => s.FqdName).ToArray(), org.OrganizationId, collection.Name);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
@ -420,19 +499,22 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
var collection = ObjectUtils.FillObjectFromDataReader<RdsCollection>(DataProvider.GetRDSCollectionById(collectionId));
|
var collection = ObjectUtils.FillObjectFromDataReader<RdsCollection>(DataProvider.GetRDSCollectionById(collectionId));
|
||||||
var settings = ObjectUtils.FillObjectFromDataReader<RdsCollectionSettings>(DataProvider.GetRdsCollectionSettingsByCollectionId(collectionId));
|
var settings = ObjectUtils.FillObjectFromDataReader<RdsCollectionSettings>(DataProvider.GetRdsCollectionSettingsByCollectionId(collectionId));
|
||||||
|
|
||||||
if (settings.SecurityLayer == null)
|
if (settings != null)
|
||||||
{
|
{
|
||||||
settings.SecurityLayer = SecurityLayerValues.Negotiate.ToString();
|
if (settings.SecurityLayer == null)
|
||||||
}
|
{
|
||||||
|
settings.SecurityLayer = SecurityLayerValues.Negotiate.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
if (settings.EncryptionLevel == null)
|
if (settings.EncryptionLevel == null)
|
||||||
{
|
{
|
||||||
settings.EncryptionLevel = EncryptionLevel.ClientCompatible.ToString();
|
settings.EncryptionLevel = EncryptionLevel.ClientCompatible.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (settings.AuthenticateUsingNLA == null)
|
if (settings.AuthenticateUsingNLA == null)
|
||||||
{
|
{
|
||||||
settings.AuthenticateUsingNLA = true;
|
settings.AuthenticateUsingNLA = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return settings;
|
return settings;
|
||||||
|
@ -453,9 +535,23 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
private static int AddRdsCollectionInternal(int itemId, RdsCollection collection)
|
private static int AddRdsCollectionInternal(int itemId, RdsCollection collection)
|
||||||
{
|
{
|
||||||
var result = TaskManager.StartResultTask<ResultObject>("REMOTE_DESKTOP_SERVICES", "ADD_RDS_COLLECTION");
|
var result = TaskManager.StartResultTask<ResultObject>("REMOTE_DESKTOP_SERVICES", "ADD_RDS_COLLECTION");
|
||||||
|
var domainName = IPGlobalProperties.GetIPGlobalProperties().DomainName;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
foreach(var server in collection.Servers)
|
||||||
|
{
|
||||||
|
if (!server.FqdName.EndsWith(domainName, StringComparison.CurrentCultureIgnoreCase))
|
||||||
|
{
|
||||||
|
throw TaskManager.WriteError(new Exception("Fully Qualified Domain Name not valid."));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!CheckRDSServerAvaliable(server.FqdName))
|
||||||
|
{
|
||||||
|
throw TaskManager.WriteError(new Exception(string.Format("Unable to connect to {0} server.", server.FqdName)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// load organization
|
// load organization
|
||||||
Organization org = OrganizationController.GetOrganization(itemId);
|
Organization org = OrganizationController.GetOrganization(itemId);
|
||||||
if (org == null)
|
if (org == null)
|
||||||
|
@ -743,7 +839,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
FillRdsServerData(tmpServer);
|
FillRdsServerData(tmpServer);
|
||||||
}
|
}
|
||||||
|
|
||||||
result.Servers = tmpServers.ToArray();
|
result.Servers = tmpServers.ToArray();
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -937,25 +1033,22 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
{
|
{
|
||||||
if (CheckRDSServerAvaliable(rdsServer.FqdName))
|
if (CheckRDSServerAvaliable(rdsServer.FqdName))
|
||||||
{
|
{
|
||||||
rdsServer.Id = DataProvider.AddRDSServer(rdsServer.Name, rdsServer.FqdName, rdsServer.Description);
|
var domainName = IPGlobalProperties.GetIPGlobalProperties().DomainName;
|
||||||
|
|
||||||
|
if (rdsServer.FqdName.EndsWith(domainName, StringComparison.CurrentCultureIgnoreCase))
|
||||||
|
{
|
||||||
|
rdsServer.Id = DataProvider.AddRDSServer(rdsServer.Name, rdsServer.FqdName, rdsServer.Description);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw TaskManager.WriteError(new Exception("Fully Qualified Domain Name not valid."));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
result.AddError("REMOTE_DESKTOP_SERVICES_ADD_RDS_SERVER", new Exception("The server that you are adding, is not available"));
|
throw TaskManager.WriteError(new Exception(string.Format("Unable to connect to {0} server. Please double check Server Full Name setting and retry.", rdsServer.FqdName)));
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
if (ex.InnerException != null)
|
|
||||||
{
|
|
||||||
result.AddError("Unable to add RDS Server", ex.InnerException);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
result.AddError("Unable to add RDS Server", ex);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
if (!result.IsSuccess)
|
if (!result.IsSuccess)
|
||||||
|
@ -1674,7 +1767,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
{
|
{
|
||||||
bool result = false;
|
bool result = false;
|
||||||
var ping = new Ping();
|
var ping = new Ping();
|
||||||
var reply = ping.Send(hostname, 1000);
|
var reply = ping.Send(hostname, 1000);
|
||||||
|
|
||||||
if (reply.Status == IPStatus.Success)
|
if (reply.Status == IPStatus.Success)
|
||||||
{
|
{
|
||||||
|
@ -1682,8 +1775,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private static ResultObject DeleteRemoteDesktopServiceInternal(int itemId)
|
private static ResultObject DeleteRemoteDesktopServiceInternal(int itemId)
|
||||||
{
|
{
|
||||||
|
@ -1732,7 +1824,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
private static RemoteDesktopServices GetRemoteDesktopServices(int serviceId)
|
private static RemoteDesktopServices GetRemoteDesktopServices(int serviceId)
|
||||||
{
|
{
|
||||||
var rds = new RemoteDesktopServices();
|
var rds = new RemoteDesktopServices();
|
||||||
ServiceProviderProxy.Init(rds, serviceId);
|
ServiceProviderProxy.Init(rds, serviceId);
|
||||||
|
|
||||||
return rds;
|
return rds;
|
||||||
}
|
}
|
||||||
|
|
|
@ -196,6 +196,36 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
EnterpriseStorageController.StartSetEnterpriseFolderSettingsBackgroundTask(itemId, folder, permissions, directoyBrowsingEnabled, quota, quotaType);
|
EnterpriseStorageController.StartSetEnterpriseFolderSettingsBackgroundTask(itemId, folder, permissions, directoyBrowsingEnabled, quota, quotaType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[WebMethod]
|
||||||
|
public void SetEnterpriseFolderGeneralSettings(int itemId, SystemFile folder, bool directoyBrowsingEnabled, int quota, QuotaType quotaType)
|
||||||
|
{
|
||||||
|
EnterpriseStorageController.SetESGeneralSettings(itemId, folder, directoyBrowsingEnabled, quota, quotaType);
|
||||||
|
}
|
||||||
|
|
||||||
|
[WebMethod]
|
||||||
|
public void SetEnterpriseFolderPermissionSettings(int itemId, SystemFile folder, ESPermission[] permissions)
|
||||||
|
{
|
||||||
|
EnterpriseStorageController.SetESFolderPermissionSettings(itemId, folder, permissions);
|
||||||
|
}
|
||||||
|
|
||||||
|
[WebMethod]
|
||||||
|
public OrganizationUser[] GetFolderOwaAccounts(int itemId, SystemFile folder)
|
||||||
|
{
|
||||||
|
return EnterpriseStorageController.GetFolderOwaAccounts(itemId, folder.Name);
|
||||||
|
}
|
||||||
|
|
||||||
|
[WebMethod]
|
||||||
|
public void SetFolderOwaAccounts(int itemId, SystemFile folder, OrganizationUser[] users)
|
||||||
|
{
|
||||||
|
EnterpriseStorageController.SetFolderOwaAccounts(itemId, folder.Name, users);
|
||||||
|
}
|
||||||
|
|
||||||
|
[WebMethod]
|
||||||
|
public List<string> GetUserEnterpriseFolderWithOwaEditPermission(int itemId, List<int> accountIds)
|
||||||
|
{
|
||||||
|
return EnterpriseStorageController.GetUserEnterpriseFolderWithOwaEditPermission(itemId, accountIds);
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Statistics
|
#region Statistics
|
||||||
|
|
|
@ -327,9 +327,27 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
}
|
}
|
||||||
|
|
||||||
[WebMethod]
|
[WebMethod]
|
||||||
public ResultObject InstallSessionHostsCertificate(int collectionId, byte[] certificate, string password)
|
public ResultObject InstallSessionHostsCertificate(RdsServer rdsServer)
|
||||||
{
|
{
|
||||||
return RemoteDesktopServicesController.InstallSessionHostsCertificate(collectionId, certificate, password);
|
return RemoteDesktopServicesController.InstallSessionHostsCertificate(rdsServer);
|
||||||
|
}
|
||||||
|
|
||||||
|
[WebMethod]
|
||||||
|
public RdsCertificate GetRdsCertificateByServiceId(int serviceId)
|
||||||
|
{
|
||||||
|
return RemoteDesktopServicesController.GetRdsCertificateByServiceId(serviceId);
|
||||||
|
}
|
||||||
|
|
||||||
|
[WebMethod]
|
||||||
|
public RdsCertificate GetRdsCertificateByItemId(int itemId)
|
||||||
|
{
|
||||||
|
return RemoteDesktopServicesController.GetRdsCertificateByItemId(itemId);
|
||||||
|
}
|
||||||
|
|
||||||
|
[WebMethod]
|
||||||
|
public ResultObject AddRdsCertificate(RdsCertificate certificate)
|
||||||
|
{
|
||||||
|
return RemoteDesktopServicesController.AddRdsCertificate(certificate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -145,6 +145,7 @@ namespace WebsitePanel.Providers.OS
|
||||||
}
|
}
|
||||||
|
|
||||||
public string RelativeUrl { get; set; }
|
public string RelativeUrl { get; set; }
|
||||||
|
public string Summary { get; set; }
|
||||||
|
|
||||||
public string DriveLetter
|
public string DriveLetter
|
||||||
{
|
{
|
||||||
|
|
|
@ -74,8 +74,8 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
|
||||||
string GetRdsServerStatus(string serverName);
|
string GetRdsServerStatus(string serverName);
|
||||||
void ShutDownRdsServer(string serverName);
|
void ShutDownRdsServer(string serverName);
|
||||||
void RestartRdsServer(string serverName);
|
void RestartRdsServer(string serverName);
|
||||||
void SaveRdsCollectionLocalAdmins(List<OrganizationUser> users, List<string> hosts);
|
void SaveRdsCollectionLocalAdmins(List<string> users, List<string> hosts, string collectionName, string organizationId);
|
||||||
List<string> GetRdsCollectionLocalAdmins(string hostName);
|
List<string> GetRdsCollectionLocalAdmins(string organizationId, string collectionName);
|
||||||
void MoveRdsServerToTenantOU(string hostName, string organizationId);
|
void MoveRdsServerToTenantOU(string hostName, string organizationId);
|
||||||
void RemoveRdsServerFromTenantOU(string hostName, string organizationId);
|
void RemoveRdsServerFromTenantOU(string hostName, string organizationId);
|
||||||
void InstallCertificate(byte[] certificate, string password, List<string> hostNames);
|
void InstallCertificate(byte[] certificate, string password, List<string> hostNames);
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace WebsitePanel.Providers.RemoteDesktopServices
|
||||||
|
{
|
||||||
|
public class RdsCertificate
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
public int ServiceId { get; set; }
|
||||||
|
public string FileName { get; set; }
|
||||||
|
public string Content { get; set; }
|
||||||
|
public string Hash { get; set; }
|
||||||
|
public DateTime? ValidFrom { get; set; }
|
||||||
|
public DateTime? ExpiryDate { get; set; }
|
||||||
|
}
|
||||||
|
}
|
|
@ -48,5 +48,6 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
|
||||||
public int? RdsCollectionId { get; set; }
|
public int? RdsCollectionId { get; set; }
|
||||||
public bool ConnectionEnabled { get; set; }
|
public bool ConnectionEnabled { get; set; }
|
||||||
public string Status { get; set; }
|
public string Status { get; set; }
|
||||||
|
public bool SslAvailable { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,11 +26,12 @@
|
||||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
|
||||||
namespace WebsitePanel.Providers.RemoteDesktopServices
|
namespace WebsitePanel.Providers.RemoteDesktopServices
|
||||||
{
|
{
|
||||||
public class RdsServersPaged
|
public class RdsServersPaged
|
||||||
{
|
{
|
||||||
public int RecordsCount { get; set; }
|
public int RecordsCount { get; set; }
|
||||||
public RdsServer[] Servers { get; set; }
|
public RdsServer[] Servers { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -129,6 +129,7 @@
|
||||||
<Compile Include="OS\QuotaType.cs" />
|
<Compile Include="OS\QuotaType.cs" />
|
||||||
<Compile Include="OS\SystemFilesPaged.cs" />
|
<Compile Include="OS\SystemFilesPaged.cs" />
|
||||||
<Compile Include="RemoteDesktopServices\IRemoteDesktopServices.cs" />
|
<Compile Include="RemoteDesktopServices\IRemoteDesktopServices.cs" />
|
||||||
|
<Compile Include="RemoteDesktopServices\RdsCertificate.cs" />
|
||||||
<Compile Include="RemoteDesktopServices\RdsCollection.cs" />
|
<Compile Include="RemoteDesktopServices\RdsCollection.cs" />
|
||||||
<Compile Include="RemoteDesktopServices\RdsCollectionPaged.cs" />
|
<Compile Include="RemoteDesktopServices\RdsCollectionPaged.cs" />
|
||||||
<Compile Include="RemoteDesktopServices\RdsCollectionSettings.cs" />
|
<Compile Include="RemoteDesktopServices\RdsCollectionSettings.cs" />
|
||||||
|
|
|
@ -304,7 +304,7 @@ namespace WebsitePanel.Providers.EnterpriseStorage
|
||||||
var rootFolder = Path.Combine(settings.LocationDrive + ":\\", settings.HomeFolder);
|
var rootFolder = Path.Combine(settings.LocationDrive + ":\\", settings.HomeFolder);
|
||||||
rootFolder = Path.Combine(rootFolder, organizationId);
|
rootFolder = Path.Combine(rootFolder, organizationId);
|
||||||
|
|
||||||
var wsSql = string.Format(@"SELECT System.FileName, System.DateModified, System.Size, System.Kind, System.ItemPathDisplay, System.ItemType FROM SYSTEMINDEX WHERE System.FileName LIKE '%{0}%' AND ({1})",
|
var wsSql = string.Format(@"SELECT System.FileName, System.DateModified, System.Size, System.Kind, System.ItemPathDisplay, System.ItemType, System.Search.AutoSummary FROM SYSTEMINDEX WHERE System.FileName LIKE '%{0}%' AND ({1})",
|
||||||
searchText, string.Join(" OR ", searchPaths.Select(x => string.Format("{0} = '{1}'", recursive ? "SCOPE" : "DIRECTORY", Path.Combine(rootFolder, x))).ToArray()));
|
searchText, string.Join(" OR ", searchPaths.Select(x => string.Format("{0} = '{1}'", recursive ? "SCOPE" : "DIRECTORY", Path.Combine(rootFolder, x))).ToArray()));
|
||||||
|
|
||||||
conn.Open();
|
conn.Open();
|
||||||
|
@ -318,7 +318,7 @@ namespace WebsitePanel.Providers.EnterpriseStorage
|
||||||
var file = new SystemFile {Name = reader[0] as string};
|
var file = new SystemFile {Name = reader[0] as string};
|
||||||
|
|
||||||
file.Changed = file.CreatedDate = reader[1] is DateTime ? (DateTime)reader[1] : new DateTime();
|
file.Changed = file.CreatedDate = reader[1] is DateTime ? (DateTime)reader[1] : new DateTime();
|
||||||
file.Size = reader[2] is long ? (long) reader[2] : 0;
|
file.Size = reader[2] is Decimal ? Convert.ToInt64((Decimal) reader[2]) : 0;
|
||||||
|
|
||||||
var kind = reader[3] is IEnumerable ? ((IEnumerable)reader[3]).Cast<string>().ToList() : null;
|
var kind = reader[3] is IEnumerable ? ((IEnumerable)reader[3]).Cast<string>().ToList() : null;
|
||||||
var itemType = reader[5] as string ?? string.Empty;
|
var itemType = reader[5] as string ?? string.Empty;
|
||||||
|
@ -342,6 +342,8 @@ namespace WebsitePanel.Providers.EnterpriseStorage
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
file.Summary = reader[6] as string;
|
||||||
|
|
||||||
result.Add(file);
|
result.Add(file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,15 +64,16 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
|
||||||
private const string Computers = "Computers";
|
private const string Computers = "Computers";
|
||||||
private const string AdDcComputers = "Domain Controllers";
|
private const string AdDcComputers = "Domain Controllers";
|
||||||
private const string Users = "users";
|
private const string Users = "users";
|
||||||
|
private const string Admins = "Admins";
|
||||||
private const string RdsGroupFormat = "rds-{0}-{1}";
|
private const string RdsGroupFormat = "rds-{0}-{1}";
|
||||||
private const string RdsModuleName = "RemoteDesktopServices";
|
private const string RdsModuleName = "RemoteDesktopServices";
|
||||||
private const string AddNpsString = "netsh nps add np name=\"\"{0}\"\" policysource=\"1\" processingorder=\"{1}\" conditionid=\"0x3d\" conditiondata=\"^5$\" conditionid=\"0x1fb5\" conditiondata=\"{2}\" conditionid=\"0x1e\" conditiondata=\"UserAuthType:(PW|CA)\" profileid=\"0x1005\" profiledata=\"TRUE\" profileid=\"0x100f\" profiledata=\"TRUE\" profileid=\"0x1009\" profiledata=\"0x7\" profileid=\"0x1fe6\" profiledata=\"0x40000000\"";
|
private const string AddNpsString = "netsh nps add np name=\"\"{0}\"\" policysource=\"1\" processingorder=\"{1}\" conditionid=\"0x3d\" conditiondata=\"^5$\" conditionid=\"0x1fb5\" conditiondata=\"{2}\" conditionid=\"0x1e\" conditiondata=\"UserAuthType:(PW|CA)\" profileid=\"0x1005\" profiledata=\"TRUE\" profileid=\"0x100f\" profiledata=\"TRUE\" profileid=\"0x1009\" profiledata=\"0x7\" profileid=\"0x1fe6\" profiledata=\"0x40000000\"";
|
||||||
private const string WspAdministratorsGroupName = "WSP-Org-Administrators";
|
|
||||||
private const string WspAdministratorsGroupDescription = "WSP Org Administrators";
|
private const string WspAdministratorsGroupDescription = "WSP Org Administrators";
|
||||||
private const string RdsServersOU = "RDSServers";
|
private const string RdsServersOU = "RDSServers";
|
||||||
private const string RDSHelpDeskComputerGroup = "Websitepanel-RDSHelpDesk-Computer";
|
private const string RDSHelpDeskComputerGroup = "Websitepanel-RDSHelpDesk-Computer";
|
||||||
private const string RDSHelpDeskGroup = "WSP-HelpDeskAdministrators";
|
private const string RDSHelpDeskGroup = "WSP-HelpDeskAdministrators";
|
||||||
private const string RDSHelpDeskGroupDescription = "WSP Help Desk Administrators";
|
private const string RDSHelpDeskGroupDescription = "WSP Help Desk Administrators";
|
||||||
|
private const string LocalAdministratorsGroupName = "Administrators";
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -310,7 +311,8 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
|
||||||
//ActiveDirectoryUtils.AddObjectToGroup(GetComputerPath(ConnectionBroker), GetComputerGroupPath(organizationId, collection.Name));
|
//ActiveDirectoryUtils.AddObjectToGroup(GetComputerPath(ConnectionBroker), GetComputerGroupPath(organizationId, collection.Name));
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckOrCreateHelpDeskComputerGroup();
|
CheckOrCreateHelpDeskComputerGroup();
|
||||||
|
string helpDeskGroupSamAccountName = CheckOrCreateAdGroup(GetHelpDeskGroupPath(RDSHelpDeskGroup), GetRootOUPath(), RDSHelpDeskGroup, RDSHelpDeskGroupDescription);
|
||||||
|
|
||||||
if (!ActiveDirectoryUtils.AdObjectExists(GetUsersGroupPath(organizationId, collection.Name)))
|
if (!ActiveDirectoryUtils.AdObjectExists(GetUsersGroupPath(organizationId, collection.Name)))
|
||||||
{
|
{
|
||||||
|
@ -341,13 +343,8 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
|
||||||
|
|
||||||
//add session servers to group
|
//add session servers to group
|
||||||
foreach (var rdsServer in collection.Servers)
|
foreach (var rdsServer in collection.Servers)
|
||||||
{
|
{
|
||||||
if (!CheckLocalAdminsGroupExists(rdsServer.FqdName, runSpace))
|
AddAdGroupToLocalAdmins(runSpace, rdsServer.FqdName, helpDeskGroupSamAccountName);
|
||||||
{
|
|
||||||
CreateLocalAdministratorsGroup(rdsServer.FqdName, runSpace);
|
|
||||||
}
|
|
||||||
|
|
||||||
AddHelpDeskAdminsGroupToLocalAdmins(runSpace, rdsServer.FqdName);
|
|
||||||
AddComputerToCollectionAdComputerGroup(organizationId, collection.Name, rdsServer);
|
AddComputerToCollectionAdComputerGroup(organizationId, collection.Name, rdsServer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -513,11 +510,13 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
|
||||||
|
|
||||||
foreach(var server in servers)
|
foreach(var server in servers)
|
||||||
{
|
{
|
||||||
|
RemoveGroupFromLocalAdmin(server.FqdName, server.Name, GetLocalAdminsGroupName(collectionName), runSpace);
|
||||||
RemoveComputerFromCollectionAdComputerGroup(organizationId, collectionName, server);
|
RemoveComputerFromCollectionAdComputerGroup(organizationId, collectionName, server);
|
||||||
}
|
}
|
||||||
|
|
||||||
ActiveDirectoryUtils.DeleteADObject(GetComputerGroupPath(organizationId, collectionName));
|
ActiveDirectoryUtils.DeleteADObject(GetComputerGroupPath(organizationId, collectionName));
|
||||||
ActiveDirectoryUtils.DeleteADObject(GetUsersGroupPath(organizationId, collectionName));
|
ActiveDirectoryUtils.DeleteADObject(GetUsersGroupPath(organizationId, collectionName));
|
||||||
|
ActiveDirectoryUtils.DeleteADObject(GetGroupPath(organizationId, collectionName, GetLocalAdminsGroupName(collectionName)));
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
@ -529,12 +528,7 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<string> GetCollectionUsers(string collectionName)
|
|
||||||
{
|
|
||||||
return GetUsersToCollectionAdGroup(collectionName);
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool SetUsersInCollection(string organizationId, string collectionName, List<string> users)
|
public bool SetUsersInCollection(string organizationId, string collectionName, List<string> users)
|
||||||
{
|
{
|
||||||
|
@ -542,7 +536,9 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
SetUsersToCollectionAdGroup(collectionName, organizationId, users);
|
var usersGroupName = GetUsersGroupName(collectionName);
|
||||||
|
var usersGroupPath = GetUsersGroupPath(organizationId, collectionName);
|
||||||
|
SetUsersToCollectionAdGroup(collectionName, organizationId, users, usersGroupName, usersGroupPath);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
@ -573,20 +569,12 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
|
||||||
|
|
||||||
ExecuteShellCommand(runSpace, cmd, false);
|
ExecuteShellCommand(runSpace, cmd, false);
|
||||||
|
|
||||||
CheckOrCreateHelpDeskComputerGroup();
|
CheckOrCreateHelpDeskComputerGroup();
|
||||||
|
string helpDeskGroupSamAccountName = CheckOrCreateAdGroup(GetHelpDeskGroupPath(RDSHelpDeskGroup), GetRootOUPath(), RDSHelpDeskGroup, RDSHelpDeskGroupDescription);
|
||||||
|
|
||||||
if (!CheckLocalAdminsGroupExists(server.FqdName, runSpace))
|
AddAdGroupToLocalAdmins(runSpace, server.FqdName, helpDeskGroupSamAccountName);
|
||||||
{
|
|
||||||
CreateLocalAdministratorsGroup(server.FqdName, runSpace);
|
|
||||||
}
|
|
||||||
|
|
||||||
AddHelpDeskAdminsGroupToLocalAdmins(runSpace, server.FqdName);
|
|
||||||
AddComputerToCollectionAdComputerGroup(organizationId, collectionName, server);
|
AddComputerToCollectionAdComputerGroup(organizationId, collectionName, server);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
CloseRunspace(runSpace);
|
CloseRunspace(runSpace);
|
||||||
|
@ -616,6 +604,7 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
|
||||||
|
|
||||||
ExecuteShellCommand(runSpace, cmd, false);
|
ExecuteShellCommand(runSpace, cmd, false);
|
||||||
|
|
||||||
|
RemoveGroupFromLocalAdmin(server.FqdName, server.Name, GetLocalAdminsGroupName(collectionName), runSpace);
|
||||||
RemoveComputerFromCollectionAdComputerGroup(organizationId, collectionName, server);
|
RemoveComputerFromCollectionAdComputerGroup(organizationId, collectionName, server);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
|
@ -978,7 +967,7 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
|
||||||
|
|
||||||
#region Local Admins
|
#region Local Admins
|
||||||
|
|
||||||
public void SaveRdsCollectionLocalAdmins(List<OrganizationUser> users, List<string> hosts)
|
public void SaveRdsCollectionLocalAdmins(List<string> users, List<string> hosts, string collectionName, string organizationId)
|
||||||
{
|
{
|
||||||
Runspace runspace = null;
|
Runspace runspace = null;
|
||||||
|
|
||||||
|
@ -987,6 +976,10 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
|
||||||
runspace = OpenRunspace();
|
runspace = OpenRunspace();
|
||||||
var index = ServerSettings.ADRootDomain.LastIndexOf(".");
|
var index = ServerSettings.ADRootDomain.LastIndexOf(".");
|
||||||
var domainName = ServerSettings.ADRootDomain;
|
var domainName = ServerSettings.ADRootDomain;
|
||||||
|
string groupName = GetLocalAdminsGroupName(collectionName);
|
||||||
|
string groupPath = GetGroupPath(organizationId, collectionName, groupName);
|
||||||
|
string helpDeskGroupSamAccountName = CheckOrCreateAdGroup(GetHelpDeskGroupPath(RDSHelpDeskGroup), GetRootOUPath(), RDSHelpDeskGroup, RDSHelpDeskGroupDescription);
|
||||||
|
string localAdminsGroupSamAccountName = CheckOrCreateAdGroup(groupPath, GetOrganizationPath(organizationId), groupName, WspAdministratorsGroupDescription);
|
||||||
|
|
||||||
if (index > 0)
|
if (index > 0)
|
||||||
{
|
{
|
||||||
|
@ -994,34 +987,11 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var hostName in hosts)
|
foreach (var hostName in hosts)
|
||||||
{
|
{
|
||||||
if (!CheckLocalAdminsGroupExists(hostName, runspace))
|
AddAdGroupToLocalAdmins(runspace, hostName, helpDeskGroupSamAccountName);
|
||||||
{
|
AddAdGroupToLocalAdmins(runspace, hostName, localAdminsGroupSamAccountName);
|
||||||
var errors = CreateLocalAdministratorsGroup(hostName, runspace);
|
|
||||||
|
|
||||||
if (errors.Any())
|
|
||||||
{
|
|
||||||
Log.WriteWarning(string.Join("\r\n", errors.Select(e => e.ToString()).ToArray()));
|
|
||||||
throw new Exception(string.Join("\r\n", errors.Select(e => e.ToString()).ToArray()));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var existingAdmins = GetExistingLocalAdmins(hostName, runspace).Select(e => e.ToLower());
|
|
||||||
var formUsers = users.Select(u => string.Format("{0}\\{1}", domainName, u.SamAccountName).ToLower());
|
|
||||||
var newUsers = users.Where(u => !existingAdmins.Contains(string.Format("{0}\\{1}", domainName, u.SamAccountName).ToLower()));
|
|
||||||
var removedUsers = existingAdmins.Where(e => !formUsers.Contains(e));
|
|
||||||
|
|
||||||
foreach (var user in newUsers)
|
SetUsersToCollectionAdGroup(collectionName, organizationId, users, GetLocalAdminsGroupName(collectionName), groupPath);
|
||||||
{
|
|
||||||
AddNewLocalAdmin(hostName, user.SamAccountName, runspace);
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (var user in removedUsers)
|
|
||||||
{
|
|
||||||
RemoveLocalAdmin(hostName, user, runspace);
|
|
||||||
}
|
|
||||||
|
|
||||||
AddHelpDeskAdminsGroupToLocalAdmins(runspace, hostName);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
|
@ -1030,126 +1000,23 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<string> GetRdsCollectionLocalAdmins(string hostName)
|
public List<string> GetRdsCollectionLocalAdmins(string organizationId, string collectionName)
|
||||||
|
{
|
||||||
|
string groupName = GetLocalAdminsGroupName(collectionName);
|
||||||
|
return GetUsersToCollectionAdGroup(collectionName, groupName, organizationId);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void RemoveGroupFromLocalAdmin(string fqdnName, string hostName, string groupName, Runspace runspace)
|
||||||
{
|
{
|
||||||
Runspace runspace = null;
|
|
||||||
var result = new List<string>();
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
runspace = OpenRunspace();
|
|
||||||
|
|
||||||
if (CheckLocalAdminsGroupExists(hostName, runspace))
|
|
||||||
{
|
|
||||||
result = GetExistingLocalAdmins(hostName, runspace);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
CloseRunspace(runspace);
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
private bool CheckLocalAdminsGroupExists(string hostName, Runspace runspace)
|
|
||||||
{
|
|
||||||
var scripts = new List<string>
|
var scripts = new List<string>
|
||||||
{
|
{
|
||||||
string.Format("net localgroup {0}", WspAdministratorsGroupName)
|
string.Format("$GroupObj = [ADSI]\"WinNT://{0}/{1}\"", hostName, LocalAdministratorsGroupName),
|
||||||
|
string.Format("$GroupObj.Remove(\"WinNT://{0}/{1}\")", ServerSettings.ADRootDomain, RDSHelpDeskGroup),
|
||||||
|
string.Format("$GroupObj.Remove(\"WinNT://{0}/{1}\")", ServerSettings.ADRootDomain, groupName)
|
||||||
};
|
};
|
||||||
|
|
||||||
object[] errors = null;
|
object[] errors = null;
|
||||||
var result = ExecuteRemoteShellCommand(runspace, hostName, scripts, out errors);
|
ExecuteRemoteShellCommand(runspace, fqdnName, scripts, out errors);
|
||||||
|
|
||||||
if (!errors.Any())
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
private object[] CreateLocalAdministratorsGroup(string hostName, Runspace runspace)
|
|
||||||
{
|
|
||||||
var scripts = new List<string>
|
|
||||||
{
|
|
||||||
string.Format("$cn = [ADSI]\"WinNT://{0}\"", hostName),
|
|
||||||
string.Format("$group = $cn.Create(\"Group\", \"{0}\")", WspAdministratorsGroupName),
|
|
||||||
"$group.setinfo()",
|
|
||||||
string.Format("$group.description = \"{0}\"", WspAdministratorsGroupDescription),
|
|
||||||
"$group.setinfo()"
|
|
||||||
};
|
|
||||||
|
|
||||||
object[] errors = null;
|
|
||||||
ExecuteRemoteShellCommand(runspace, hostName, scripts, out errors);
|
|
||||||
|
|
||||||
if (!errors.Any())
|
|
||||||
{
|
|
||||||
scripts = new List<string>
|
|
||||||
{
|
|
||||||
string.Format("$GroupObj = [ADSI]\"WinNT://{0}/Administrators\"", hostName),
|
|
||||||
string.Format("$GroupObj.Add(\"WinNT://{0}/{1}\")", hostName.ToLower().Replace(string.Format(".{0}", ServerSettings.ADRootDomain.ToLower()), ""), WspAdministratorsGroupName)
|
|
||||||
};
|
|
||||||
|
|
||||||
errors = null;
|
|
||||||
ExecuteRemoteShellCommand(runspace, hostName, scripts, out errors);
|
|
||||||
}
|
|
||||||
|
|
||||||
return errors;
|
|
||||||
}
|
|
||||||
|
|
||||||
private List<string> GetExistingLocalAdmins(string hostName, Runspace runspace)
|
|
||||||
{
|
|
||||||
var result = new List<string>();
|
|
||||||
|
|
||||||
var scripts = new List<string>
|
|
||||||
{
|
|
||||||
string.Format("net localgroup {0} | select -skip 6", WspAdministratorsGroupName)
|
|
||||||
};
|
|
||||||
|
|
||||||
object[] errors = null;
|
|
||||||
var exitingAdmins = ExecuteRemoteShellCommand(runspace, hostName, scripts, out errors);
|
|
||||||
|
|
||||||
if (!errors.Any())
|
|
||||||
{
|
|
||||||
foreach(var user in exitingAdmins.Take(exitingAdmins.Count - 2))
|
|
||||||
{
|
|
||||||
result.Add(user.ToString());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
private object[] AddNewLocalAdmin(string hostName, string samAccountName, Runspace runspace)
|
|
||||||
{
|
|
||||||
var scripts = new List<string>
|
|
||||||
{
|
|
||||||
string.Format("$GroupObj = [ADSI]\"WinNT://{0}/{1}\"", hostName, WspAdministratorsGroupName),
|
|
||||||
string.Format("$GroupObj.Add(\"WinNT://{0}/{1}\")", ServerSettings.ADRootDomain, samAccountName)
|
|
||||||
};
|
|
||||||
|
|
||||||
object[] errors = null;
|
|
||||||
ExecuteRemoteShellCommand(runspace, hostName, scripts, out errors);
|
|
||||||
|
|
||||||
return errors;
|
|
||||||
}
|
|
||||||
|
|
||||||
private object[] RemoveLocalAdmin(string hostName, string user, Runspace runspace)
|
|
||||||
{
|
|
||||||
var userObject = user.Split('\\');
|
|
||||||
|
|
||||||
var scripts = new List<string>
|
|
||||||
{
|
|
||||||
string.Format("$GroupObj = [ADSI]\"WinNT://{0}/{1}\"", hostName, WspAdministratorsGroupName),
|
|
||||||
string.Format("$GroupObj.Remove(\"WinNT://{0}/{1}\")", userObject[0], userObject[1])
|
|
||||||
};
|
|
||||||
|
|
||||||
object[] errors = null;
|
|
||||||
ExecuteRemoteShellCommand(runspace, hostName, scripts, out errors);
|
|
||||||
|
|
||||||
return errors;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -1177,23 +1044,22 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void AddHelpDeskAdminsGroupToLocalAdmins(Runspace runspace, string hostName)
|
private string CheckOrCreateAdGroup(string groupPath, string rootPath, string groupName, string description)
|
||||||
{
|
{
|
||||||
var helpDeskAdminsGroupPath = GetHelpDeskGroupPath(RDSHelpDeskGroup);
|
|
||||||
DirectoryEntry groupEntry = null;
|
DirectoryEntry groupEntry = null;
|
||||||
|
|
||||||
if (!ActiveDirectoryUtils.AdObjectExists(helpDeskAdminsGroupPath))
|
if (!ActiveDirectoryUtils.AdObjectExists(groupPath))
|
||||||
{
|
{
|
||||||
ActiveDirectoryUtils.CreateGroup(GetRootOUPath(), RDSHelpDeskGroup);
|
ActiveDirectoryUtils.CreateGroup(rootPath, groupName);
|
||||||
groupEntry = ActiveDirectoryUtils.GetADObject(helpDeskAdminsGroupPath);
|
groupEntry = ActiveDirectoryUtils.GetADObject(groupPath);
|
||||||
|
|
||||||
if (groupEntry.Properties.Contains("Description"))
|
if (groupEntry.Properties.Contains("Description"))
|
||||||
{
|
{
|
||||||
groupEntry.Properties["Description"][0] = RDSHelpDeskGroupDescription;
|
groupEntry.Properties["Description"][0] = description;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
groupEntry.Properties["Description"].Add(RDSHelpDeskGroupDescription);
|
groupEntry.Properties["Description"].Add(description);
|
||||||
}
|
}
|
||||||
|
|
||||||
groupEntry.CommitChanges();
|
groupEntry.CommitChanges();
|
||||||
|
@ -1201,14 +1067,17 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
|
||||||
|
|
||||||
if (groupEntry == null)
|
if (groupEntry == null)
|
||||||
{
|
{
|
||||||
groupEntry = ActiveDirectoryUtils.GetADObject(helpDeskAdminsGroupPath);
|
groupEntry = ActiveDirectoryUtils.GetADObject(groupPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
var samAccountName = ActiveDirectoryUtils.GetADObjectProperty(groupEntry, "sAMAccountName");
|
return ActiveDirectoryUtils.GetADObjectProperty(groupEntry, "sAMAccountName").ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void AddAdGroupToLocalAdmins(Runspace runspace, string hostName, string samAccountName)
|
||||||
|
{
|
||||||
var scripts = new List<string>
|
var scripts = new List<string>
|
||||||
{
|
{
|
||||||
string.Format("$GroupObj = [ADSI]\"WinNT://{0}/{1}\"", hostName, WspAdministratorsGroupName),
|
string.Format("$GroupObj = [ADSI]\"WinNT://{0}/{1}\"", hostName, LocalAdministratorsGroupName),
|
||||||
string.Format("$GroupObj.Add(\"WinNT://{0}/{1}\")", ServerSettings.ADRootDomain, samAccountName)
|
string.Format("$GroupObj.Add(\"WinNT://{0}/{1}\")", ServerSettings.ADRootDomain, samAccountName)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1227,7 +1096,7 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var guid = Guid.NewGuid();
|
var guid = Guid.NewGuid();
|
||||||
var x509Cert = new X509Certificate2(certificate, password, X509KeyStorageFlags.Exportable);
|
var x509Cert = new X509Certificate2(certificate, password, X509KeyStorageFlags.Exportable);
|
||||||
//var content = x509Cert.Export(X509ContentType.Pfx);
|
//var content = x509Cert.Export(X509ContentType.Pfx);
|
||||||
var filePath = SaveCertificate(certificate, guid);
|
var filePath = SaveCertificate(certificate, guid);
|
||||||
runspace = OpenRunspace();
|
runspace = OpenRunspace();
|
||||||
|
@ -1355,21 +1224,17 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetUsersToCollectionAdGroup(string collectionName, string organizationId, IEnumerable<string> users)
|
private void SetUsersToCollectionAdGroup(string collectionName, string organizationId, IEnumerable<string> users, string groupName, string groupPath)
|
||||||
{
|
{
|
||||||
var usersGroupName = GetUsersGroupName(collectionName);
|
|
||||||
var usersGroupPath = GetUsersGroupPath(organizationId, collectionName);
|
|
||||||
var orgPath = GetOrganizationPath(organizationId);
|
var orgPath = GetOrganizationPath(organizationId);
|
||||||
var orgEntry = ActiveDirectoryUtils.GetADObject(orgPath);
|
var orgEntry = ActiveDirectoryUtils.GetADObject(orgPath);
|
||||||
var groupUsers = ActiveDirectoryUtils.GetGroupObjects(usersGroupName, "user", orgEntry);
|
var groupUsers = ActiveDirectoryUtils.GetGroupObjects(groupName, "user", orgEntry);
|
||||||
|
|
||||||
//remove all users from group
|
|
||||||
foreach (string userPath in groupUsers)
|
foreach (string userPath in groupUsers)
|
||||||
{
|
{
|
||||||
ActiveDirectoryUtils.RemoveObjectFromGroup(userPath, usersGroupPath);
|
ActiveDirectoryUtils.RemoveObjectFromGroup(userPath, groupPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
//adding users to group
|
|
||||||
foreach (var user in users)
|
foreach (var user in users)
|
||||||
{
|
{
|
||||||
var userPath = GetUserPath(organizationId, user);
|
var userPath = GetUserPath(organizationId, user);
|
||||||
|
@ -1377,20 +1242,19 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
|
||||||
if (ActiveDirectoryUtils.AdObjectExists(userPath))
|
if (ActiveDirectoryUtils.AdObjectExists(userPath))
|
||||||
{
|
{
|
||||||
var userObject = ActiveDirectoryUtils.GetADObject(userPath);
|
var userObject = ActiveDirectoryUtils.GetADObject(userPath);
|
||||||
var samName = (string)ActiveDirectoryUtils.GetADObjectProperty(userObject, "sAMAccountName");
|
var samName = (string)ActiveDirectoryUtils.GetADObjectProperty(userObject, "sAMAccountName");
|
||||||
var userGroupsPath = GetUsersGroupPath(organizationId, collectionName);
|
ActiveDirectoryUtils.AddObjectToGroup(userPath, groupPath);
|
||||||
ActiveDirectoryUtils.AddObjectToGroup(userPath, userGroupsPath);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<string> GetUsersToCollectionAdGroup(string collectionName)
|
private List<string> GetUsersToCollectionAdGroup(string collectionName, string groupName, string organizationId)
|
||||||
{
|
{
|
||||||
var users = new List<string>();
|
var users = new List<string>();
|
||||||
|
var orgPath = GetOrganizationPath(organizationId);
|
||||||
|
var orgEntry = ActiveDirectoryUtils.GetADObject(orgPath);
|
||||||
|
|
||||||
var usersGroupName = GetUsersGroupName(collectionName);
|
foreach (string userPath in ActiveDirectoryUtils.GetGroupObjects(groupName, "user", orgEntry))
|
||||||
|
|
||||||
foreach (string userPath in ActiveDirectoryUtils.GetGroupObjects(usersGroupName, "user"))
|
|
||||||
{
|
{
|
||||||
var userObject = ActiveDirectoryUtils.GetADObject(userPath);
|
var userObject = ActiveDirectoryUtils.GetADObject(userPath);
|
||||||
var samName = (string)ActiveDirectoryUtils.GetADObjectProperty(userObject, "sAMAccountName");
|
var samName = (string)ActiveDirectoryUtils.GetADObjectProperty(userObject, "sAMAccountName");
|
||||||
|
@ -1479,7 +1343,17 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
|
||||||
{
|
{
|
||||||
runSpace = OpenRunspace();
|
runSpace = OpenRunspace();
|
||||||
var feature = AddFeature(runSpace, hostName, "RDS-RD-Server", true, true);
|
var feature = AddFeature(runSpace, hostName, "RDS-RD-Server", true, true);
|
||||||
installationResult = (bool)GetPSObjectProperty(feature, "Success");
|
installationResult = (bool)GetPSObjectProperty(feature, "Success");
|
||||||
|
|
||||||
|
if (!IsFeatureInstalled(hostName, "Desktop-Experience", runSpace))
|
||||||
|
{
|
||||||
|
feature = AddFeature(runSpace, hostName, "Desktop-Experience", true, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!IsFeatureInstalled(hostName, "NET-Framework-Core", runSpace))
|
||||||
|
{
|
||||||
|
feature = AddFeature(runSpace, hostName, "NET-Framework-Core", true, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
|
@ -1738,6 +1612,11 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
|
||||||
return string.Format(RdsGroupFormat, collectionName, Users.ToLowerInvariant());
|
return string.Format(RdsGroupFormat, collectionName, Users.ToLowerInvariant());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private string GetLocalAdminsGroupName(string collectionName)
|
||||||
|
{
|
||||||
|
return string.Format(RdsGroupFormat, collectionName, Admins.ToLowerInvariant());
|
||||||
|
}
|
||||||
|
|
||||||
internal string GetComputerGroupPath(string organizationId, string collection)
|
internal string GetComputerGroupPath(string organizationId, string collection)
|
||||||
{
|
{
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
@ -1766,6 +1645,20 @@ namespace WebsitePanel.Providers.RemoteDesktopServices
|
||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private string GetGroupPath(string organizationId, string collectionName, string groupName)
|
||||||
|
{
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
|
AppendProtocol(sb);
|
||||||
|
AppendDomainController(sb);
|
||||||
|
AppendCNPath(sb, groupName);
|
||||||
|
AppendOUPath(sb, organizationId);
|
||||||
|
AppendOUPath(sb, RootOU);
|
||||||
|
AppendDomainPath(sb, RootDomain);
|
||||||
|
|
||||||
|
return sb.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
private string GetUserPath(string organizationId, string loginName)
|
private string GetUserPath(string organizationId, string loginName)
|
||||||
{
|
{
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
|
@ -84,7 +84,7 @@ namespace WebsitePanel.Providers.Web.Iis
|
||||||
X509CertificateCollection existCerts2 = storeMy.Certificates.Find(X509FindType.FindBySerialNumber, servercert.SerialNumber, false);
|
X509CertificateCollection existCerts2 = storeMy.Certificates.Find(X509FindType.FindBySerialNumber, servercert.SerialNumber, false);
|
||||||
var certData = existCerts2[0].Export(X509ContentType.Pfx);
|
var certData = existCerts2[0].Export(X509ContentType.Pfx);
|
||||||
storeMy.Close();
|
storeMy.Close();
|
||||||
var x509Cert = new X509Certificate2(certData);
|
var x509Cert = new X509Certificate2(certData, string.Empty, X509KeyStorageFlags.MachineKeySet | X509KeyStorageFlags.Exportable | X509KeyStorageFlags.PersistKeySet);
|
||||||
|
|
||||||
if (UseCCS)
|
if (UseCCS)
|
||||||
{
|
{
|
||||||
|
@ -176,10 +176,10 @@ namespace WebsitePanel.Providers.Web.Iis
|
||||||
if (UseCCS)
|
if (UseCCS)
|
||||||
{
|
{
|
||||||
// We need to use this constructor or we won't be able to export this certificate
|
// We need to use this constructor or we won't be able to export this certificate
|
||||||
x509Cert = new X509Certificate2(certificate, password, X509KeyStorageFlags.Exportable);
|
x509Cert = new X509Certificate2(certificate, password, X509KeyStorageFlags.MachineKeySet | X509KeyStorageFlags.Exportable | X509KeyStorageFlags.PersistKeySet);
|
||||||
|
|
||||||
var certData = x509Cert.Export(X509ContentType.Pfx);
|
var certData = x509Cert.Export(X509ContentType.Pfx);
|
||||||
var convertedCert = new X509Certificate2(certData, string.Empty, X509KeyStorageFlags.Exportable);
|
var convertedCert = new X509Certificate2(certData, string.Empty, X509KeyStorageFlags.MachineKeySet | X509KeyStorageFlags.Exportable | X509KeyStorageFlags.PersistKeySet);
|
||||||
|
|
||||||
// Attempts to move certificate to CCS UNC path
|
// Attempts to move certificate to CCS UNC path
|
||||||
try
|
try
|
||||||
|
@ -205,7 +205,7 @@ namespace WebsitePanel.Providers.Web.Iis
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
x509Cert = new X509Certificate2(certificate, password);
|
x509Cert = new X509Certificate2(certificate, password, X509KeyStorageFlags.MachineKeySet | X509KeyStorageFlags.Exportable | X509KeyStorageFlags.PersistKeySet);
|
||||||
|
|
||||||
// Step 1: Register X.509 certificate in the store
|
// Step 1: Register X.509 certificate in the store
|
||||||
// Trying to keep X.509 store open as less as possible
|
// Trying to keep X.509 store open as less as possible
|
||||||
|
@ -278,7 +278,7 @@ namespace WebsitePanel.Providers.Web.Iis
|
||||||
// Read certificate data from file
|
// Read certificate data from file
|
||||||
var certData = new byte[fileStream.Length];
|
var certData = new byte[fileStream.Length];
|
||||||
fileStream.Read(certData, 0, (int) fileStream.Length);
|
fileStream.Read(certData, 0, (int) fileStream.Length);
|
||||||
var convertedCert = new X509Certificate2(certData, CCSCommonPassword, X509KeyStorageFlags.Exportable);
|
var convertedCert = new X509Certificate2(certData, CCSCommonPassword, X509KeyStorageFlags.MachineKeySet | X509KeyStorageFlags.Exportable | X509KeyStorageFlags.PersistKeySet);
|
||||||
|
|
||||||
fileStream.Close();
|
fileStream.Close();
|
||||||
|
|
||||||
|
@ -311,7 +311,7 @@ namespace WebsitePanel.Providers.Web.Iis
|
||||||
{
|
{
|
||||||
hostNames.AddRange(certificate.Extensions.Cast<X509Extension>()
|
hostNames.AddRange(certificate.Extensions.Cast<X509Extension>()
|
||||||
.Where(e => e.Oid.Value == "2.5.29.17") // Subject Alternative Names
|
.Where(e => e.Oid.Value == "2.5.29.17") // Subject Alternative Names
|
||||||
.SelectMany(e => e.Format(true).Split(new[] {"\r\n", "\n", "\n"}, StringSplitOptions.RemoveEmptyEntries).Select(s => s.Split('=')[1])));
|
.SelectMany(e => e.Format(true).Split(new[] {"\r\n", "\n", "\n"}, StringSplitOptions.RemoveEmptyEntries).Where(s => s.Contains("=")).Select(s => s.Split('=')[1])).Where(s => !s.Contains(" ")));
|
||||||
}
|
}
|
||||||
|
|
||||||
var simpleName = certificate.GetNameInfo(X509NameType.SimpleName, false);
|
var simpleName = certificate.GetNameInfo(X509NameType.SimpleName, false);
|
||||||
|
@ -320,7 +320,20 @@ namespace WebsitePanel.Providers.Web.Iis
|
||||||
hostNames.Add(simpleName);
|
hostNames.Add(simpleName);
|
||||||
}
|
}
|
||||||
|
|
||||||
// For every hostname (only one if using old school dedicated IP binding)
|
var wildcardHostName = hostNames.SingleOrDefault(h => h.StartsWith("*."));
|
||||||
|
|
||||||
|
// If a wildcard certificate is used
|
||||||
|
if (wildcardHostName != null)
|
||||||
|
{
|
||||||
|
if (!dedicatedIp)
|
||||||
|
{
|
||||||
|
// If using a wildcard ssl and not a dedicated IP, we take all the matching bindings on the site and use it to bind to SSL also.
|
||||||
|
hostNames.Remove(wildcardHostName);
|
||||||
|
hostNames.AddRange(website.Bindings.Where(b => !string.IsNullOrEmpty(b.Host) && b.Host.EndsWith(wildcardHostName.Substring(2))).Select(b => b.Host));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// For every hostname
|
||||||
foreach (var hostName in hostNames)
|
foreach (var hostName in hostNames)
|
||||||
{
|
{
|
||||||
var bindingInformation = string.Format("{0}:443:{1}", website.SiteIPAddress ?? "*", dedicatedIp ? "" : hostName);
|
var bindingInformation = string.Format("{0}:443:{1}", website.SiteIPAddress ?? "*", dedicatedIp ? "" : hostName);
|
||||||
|
|
|
@ -18,7 +18,6 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
|
||||||
using System.Web.Services.Protocols;
|
using System.Web.Services.Protocols;
|
||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using WebsitePanel.Providers.HostedSolution;
|
|
||||||
|
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
|
@ -1515,17 +1514,21 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
|
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
|
||||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SaveRdsCollectionLocalAdmins", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SaveRdsCollectionLocalAdmins", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||||
public void SaveRdsCollectionLocalAdmins(OrganizationUser[] users, string[] hosts) {
|
public void SaveRdsCollectionLocalAdmins(string[] users, string[] hosts, string organizationId, string collectionName) {
|
||||||
this.Invoke("SaveRdsCollectionLocalAdmins", new object[] {
|
this.Invoke("SaveRdsCollectionLocalAdmins", new object[] {
|
||||||
users,
|
users,
|
||||||
hosts});
|
hosts,
|
||||||
|
organizationId,
|
||||||
|
collectionName});
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
public System.IAsyncResult BeginSaveRdsCollectionLocalAdmins(OrganizationUser[] users, string[] hosts, System.AsyncCallback callback, object asyncState) {
|
public System.IAsyncResult BeginSaveRdsCollectionLocalAdmins(string[] users, string[] hosts, string organizationId, string collectionName, System.AsyncCallback callback, object asyncState) {
|
||||||
return this.BeginInvoke("SaveRdsCollectionLocalAdmins", new object[] {
|
return this.BeginInvoke("SaveRdsCollectionLocalAdmins", new object[] {
|
||||||
users,
|
users,
|
||||||
hosts}, callback, asyncState);
|
hosts,
|
||||||
|
organizationId,
|
||||||
|
collectionName}, callback, asyncState);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
|
@ -1534,18 +1537,20 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
public void SaveRdsCollectionLocalAdminsAsync(OrganizationUser[] users, string[] hosts) {
|
public void SaveRdsCollectionLocalAdminsAsync(string[] users, string[] hosts, string organizationId, string collectionName) {
|
||||||
this.SaveRdsCollectionLocalAdminsAsync(users, hosts, null);
|
this.SaveRdsCollectionLocalAdminsAsync(users, hosts, organizationId, collectionName, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
public void SaveRdsCollectionLocalAdminsAsync(OrganizationUser[] users, string[] hosts, object userState) {
|
public void SaveRdsCollectionLocalAdminsAsync(string[] users, string[] hosts, string organizationId, string collectionName, object userState) {
|
||||||
if ((this.SaveRdsCollectionLocalAdminsOperationCompleted == null)) {
|
if ((this.SaveRdsCollectionLocalAdminsOperationCompleted == null)) {
|
||||||
this.SaveRdsCollectionLocalAdminsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSaveRdsCollectionLocalAdminsOperationCompleted);
|
this.SaveRdsCollectionLocalAdminsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSaveRdsCollectionLocalAdminsOperationCompleted);
|
||||||
}
|
}
|
||||||
this.InvokeAsync("SaveRdsCollectionLocalAdmins", new object[] {
|
this.InvokeAsync("SaveRdsCollectionLocalAdmins", new object[] {
|
||||||
users,
|
users,
|
||||||
hosts}, this.SaveRdsCollectionLocalAdminsOperationCompleted, userState);
|
hosts,
|
||||||
|
organizationId,
|
||||||
|
collectionName}, this.SaveRdsCollectionLocalAdminsOperationCompleted, userState);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnSaveRdsCollectionLocalAdminsOperationCompleted(object arg) {
|
private void OnSaveRdsCollectionLocalAdminsOperationCompleted(object arg) {
|
||||||
|
@ -1558,16 +1563,18 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
|
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
|
||||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetRdsCollectionLocalAdmins", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetRdsCollectionLocalAdmins", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||||
public string[] GetRdsCollectionLocalAdmins(string hostName) {
|
public string[] GetRdsCollectionLocalAdmins(string organizationId, string collectionName) {
|
||||||
object[] results = this.Invoke("GetRdsCollectionLocalAdmins", new object[] {
|
object[] results = this.Invoke("GetRdsCollectionLocalAdmins", new object[] {
|
||||||
hostName});
|
organizationId,
|
||||||
|
collectionName});
|
||||||
return ((string[])(results[0]));
|
return ((string[])(results[0]));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
public System.IAsyncResult BeginGetRdsCollectionLocalAdmins(string hostName, System.AsyncCallback callback, object asyncState) {
|
public System.IAsyncResult BeginGetRdsCollectionLocalAdmins(string organizationId, string collectionName, System.AsyncCallback callback, object asyncState) {
|
||||||
return this.BeginInvoke("GetRdsCollectionLocalAdmins", new object[] {
|
return this.BeginInvoke("GetRdsCollectionLocalAdmins", new object[] {
|
||||||
hostName}, callback, asyncState);
|
organizationId,
|
||||||
|
collectionName}, callback, asyncState);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
|
@ -1577,17 +1584,18 @@ namespace WebsitePanel.Providers.RemoteDesktopServices {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
public void GetRdsCollectionLocalAdminsAsync(string hostName) {
|
public void GetRdsCollectionLocalAdminsAsync(string organizationId, string collectionName) {
|
||||||
this.GetRdsCollectionLocalAdminsAsync(hostName, null);
|
this.GetRdsCollectionLocalAdminsAsync(organizationId, collectionName, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
public void GetRdsCollectionLocalAdminsAsync(string hostName, object userState) {
|
public void GetRdsCollectionLocalAdminsAsync(string organizationId, string collectionName, object userState) {
|
||||||
if ((this.GetRdsCollectionLocalAdminsOperationCompleted == null)) {
|
if ((this.GetRdsCollectionLocalAdminsOperationCompleted == null)) {
|
||||||
this.GetRdsCollectionLocalAdminsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetRdsCollectionLocalAdminsOperationCompleted);
|
this.GetRdsCollectionLocalAdminsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetRdsCollectionLocalAdminsOperationCompleted);
|
||||||
}
|
}
|
||||||
this.InvokeAsync("GetRdsCollectionLocalAdmins", new object[] {
|
this.InvokeAsync("GetRdsCollectionLocalAdmins", new object[] {
|
||||||
hostName}, this.GetRdsCollectionLocalAdminsOperationCompleted, userState);
|
organizationId,
|
||||||
|
collectionName}, this.GetRdsCollectionLocalAdminsOperationCompleted, userState);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnGetRdsCollectionLocalAdminsOperationCompleted(object arg) {
|
private void OnGetRdsCollectionLocalAdminsOperationCompleted(object arg) {
|
||||||
|
|
|
@ -566,12 +566,12 @@ namespace WebsitePanel.Server
|
||||||
}
|
}
|
||||||
|
|
||||||
[WebMethod, SoapHeader("settings")]
|
[WebMethod, SoapHeader("settings")]
|
||||||
public void SaveRdsCollectionLocalAdmins(List<OrganizationUser> users, List<string> hosts)
|
public void SaveRdsCollectionLocalAdmins(List<string> users, List<string> hosts, string organizationId, string collectionName)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Log.WriteStart("'{0}' SaveRdsCollectionLocalAdmins", ProviderSettings.ProviderName);
|
Log.WriteStart("'{0}' SaveRdsCollectionLocalAdmins", ProviderSettings.ProviderName);
|
||||||
RDSProvider.SaveRdsCollectionLocalAdmins(users, hosts);
|
RDSProvider.SaveRdsCollectionLocalAdmins(users, hosts, collectionName, organizationId);
|
||||||
Log.WriteEnd("'{0}' SaveRdsCollectionLocalAdmins", ProviderSettings.ProviderName);
|
Log.WriteEnd("'{0}' SaveRdsCollectionLocalAdmins", ProviderSettings.ProviderName);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
@ -582,12 +582,12 @@ namespace WebsitePanel.Server
|
||||||
}
|
}
|
||||||
|
|
||||||
[WebMethod, SoapHeader("settings")]
|
[WebMethod, SoapHeader("settings")]
|
||||||
public List<string> GetRdsCollectionLocalAdmins(string hostName)
|
public List<string> GetRdsCollectionLocalAdmins(string organizationId, string collectionName)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Log.WriteStart("'{0}' GetRdsCollectionLocalAdmins", ProviderSettings.ProviderName);
|
Log.WriteStart("'{0}' GetRdsCollectionLocalAdmins", ProviderSettings.ProviderName);
|
||||||
var result = RDSProvider.GetRdsCollectionLocalAdmins(hostName);
|
var result = RDSProvider.GetRdsCollectionLocalAdmins(organizationId, collectionName);
|
||||||
Log.WriteEnd("'{0}' GetRdsCollectionLocalAdmins", ProviderSettings.ProviderName);
|
Log.WriteEnd("'{0}' GetRdsCollectionLocalAdmins", ProviderSettings.ProviderName);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
|
@ -5,17 +5,6 @@
|
||||||
<section name="microsoft.web.services3" type="Microsoft.Web.Services3.Configuration.WebServicesConfiguration, Microsoft.Web.Services3"/>
|
<section name="microsoft.web.services3" type="Microsoft.Web.Services3.Configuration.WebServicesConfiguration, Microsoft.Web.Services3"/>
|
||||||
<section name="websitepanel.server" type="WebsitePanel.Server.ServerConfiguration, WebsitePanel.Server"/>
|
<section name="websitepanel.server" type="WebsitePanel.Server.ServerConfiguration, WebsitePanel.Server"/>
|
||||||
<section name="cachingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Caching.Configuration.CacheManagerSettings,Microsoft.Practices.EnterpriseLibrary.Caching"/>
|
<section name="cachingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Caching.Configuration.CacheManagerSettings,Microsoft.Practices.EnterpriseLibrary.Caching"/>
|
||||||
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
|
|
||||||
<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
|
|
||||||
<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
|
|
||||||
<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
|
|
||||||
<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
|
|
||||||
<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
|
|
||||||
<section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
|
|
||||||
</sectionGroup>
|
|
||||||
<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
|
|
||||||
</sectionGroup>
|
|
||||||
</sectionGroup>
|
|
||||||
</configSections>
|
</configSections>
|
||||||
<appSettings>
|
<appSettings>
|
||||||
<add key="WebsitePanel.HyperV.UseDiskPartClearReadOnlyFlag" value="false"/>
|
<add key="WebsitePanel.HyperV.UseDiskPartClearReadOnlyFlag" value="false"/>
|
||||||
|
|
|
@ -45,6 +45,16 @@ namespace WebsitePanel.WebDav.Core.Config.Entities
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public string OwaEditFoldersSessionKey
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
SessionKeysElement sessionKey =
|
||||||
|
_sessionKeys.FirstOrDefault(x => x.Key == SessionKeysElement.OwaEditFoldersSessionKey);
|
||||||
|
return sessionKey != null ? sessionKey.Value : null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public string WebDavRootFoldersPermissions
|
public string WebDavRootFoldersPermissions
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|
|
@ -14,6 +14,7 @@ namespace WebsitePanel.WebDav.Core.Config.WebConfigSections
|
||||||
public const string WebDavRootFolderPermissionsKey = "WebDavRootFolderPermissionsKey";
|
public const string WebDavRootFolderPermissionsKey = "WebDavRootFolderPermissionsKey";
|
||||||
public const string ResourseRenderCountKey = "ResourseRenderCountSessionKey";
|
public const string ResourseRenderCountKey = "ResourseRenderCountSessionKey";
|
||||||
public const string ItemIdSessionKey = "ItemId";
|
public const string ItemIdSessionKey = "ItemId";
|
||||||
|
public const string OwaEditFoldersSessionKey = "OwaEditFoldersSession";
|
||||||
|
|
||||||
[ConfigurationProperty(KeyKey, IsKey = true, IsRequired = true)]
|
[ConfigurationProperty(KeyKey, IsKey = true, IsRequired = true)]
|
||||||
public string Key
|
public string Key
|
||||||
|
|
|
@ -3,7 +3,7 @@ using System.Linq;
|
||||||
|
|
||||||
namespace WebsitePanel.WebDav.Core.Extensions
|
namespace WebsitePanel.WebDav.Core.Extensions
|
||||||
{
|
{
|
||||||
static class UriExtensions
|
public static class UriExtensions
|
||||||
{
|
{
|
||||||
public static Uri Append(this Uri uri, params string[] paths)
|
public static Uri Append(this Uri uri, params string[] paths)
|
||||||
{
|
{
|
||||||
|
|
|
@ -295,11 +295,11 @@ namespace WebsitePanel.WebDav.Core
|
||||||
{
|
{
|
||||||
XmlResponseList = XmlDoc.GetElementsByTagName("d:response");
|
XmlResponseList = XmlDoc.GetElementsByTagName("d:response");
|
||||||
}
|
}
|
||||||
var children = new WebDavHierarchyItem[XmlResponseList.Count];
|
var children = new WebDavResource[XmlResponseList.Count];
|
||||||
int counter = 0;
|
int counter = 0;
|
||||||
foreach (XmlNode XmlCurrentResponse in XmlResponseList)
|
foreach (XmlNode XmlCurrentResponse in XmlResponseList)
|
||||||
{
|
{
|
||||||
var item = new WebDavHierarchyItem();
|
var item = new WebDavResource();
|
||||||
item.SetCredentials(_credentials);
|
item.SetCredentials(_credentials);
|
||||||
|
|
||||||
foreach (XmlNode XmlCurrentNode in XmlCurrentResponse.ChildNodes)
|
foreach (XmlNode XmlCurrentNode in XmlCurrentResponse.ChildNodes)
|
||||||
|
|
|
@ -9,6 +9,7 @@ namespace WebsitePanel.WebDav.Core
|
||||||
long ContentLength { get; }
|
long ContentLength { get; }
|
||||||
long AllocatedSpace { get; set; }
|
long AllocatedSpace { get; set; }
|
||||||
string ContentType { get; }
|
string ContentType { get; }
|
||||||
|
string Summary { get; set; }
|
||||||
|
|
||||||
void Download(string filename);
|
void Download(string filename);
|
||||||
byte[] Download();
|
byte[] Download();
|
||||||
|
|
|
@ -50,6 +50,7 @@ namespace WebsitePanel.WebDav.Core
|
||||||
SendChunked = false;
|
SendChunked = false;
|
||||||
AllowWriteStreamBuffering = false;
|
AllowWriteStreamBuffering = false;
|
||||||
|
|
||||||
|
IsRootItem = item.IsRootItem;
|
||||||
SetCredentials(credentials);
|
SetCredentials(credentials);
|
||||||
SetHierarchyItem(item);
|
SetHierarchyItem(item);
|
||||||
}
|
}
|
||||||
|
@ -88,6 +89,8 @@ namespace WebsitePanel.WebDav.Core
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public string Summary { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Downloads content of the resource to a file specified by filename
|
/// Downloads content of the resource to a file specified by filename
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -19,5 +19,6 @@ namespace WebsitePanel.WebDav.Core.Interfaces.Managers
|
||||||
string GetFileUrl(string path);
|
string GetFileUrl(string path);
|
||||||
void DeleteResource(string path);
|
void DeleteResource(string path);
|
||||||
void LockFile(string path);
|
void LockFile(string path);
|
||||||
|
string GetFileFolderPath(string path);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -50,9 +50,9 @@ namespace WebsitePanel.WebDav.Core.Managers
|
||||||
children = ConnectToWebDavServer().Select(x => new WebDavResource
|
children = ConnectToWebDavServer().Select(x => new WebDavResource
|
||||||
{
|
{
|
||||||
Href = new Uri(x.Url),
|
Href = new Uri(x.Url),
|
||||||
ItemType = ItemType.Folder,
|
ItemType = ItemType.Folder,
|
||||||
ContentLength = x.Size,
|
ContentLength = x.Size * 1024 * 1024,
|
||||||
AllocatedSpace = x.FRSMQuotaMB,
|
AllocatedSpace = x.FRSMQuotaMB * 1024 * 1024,
|
||||||
IsRootItem = true
|
IsRootItem = true
|
||||||
}).ToArray();
|
}).ToArray();
|
||||||
}
|
}
|
||||||
|
@ -103,7 +103,7 @@ namespace WebsitePanel.WebDav.Core.Managers
|
||||||
|
|
||||||
public bool IsFile(string path)
|
public bool IsFile(string path)
|
||||||
{
|
{
|
||||||
string folder = GetFileFolder(path);
|
string folder = GetFileFolderPath(path);
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(folder))
|
if (string.IsNullOrWhiteSpace(folder))
|
||||||
{
|
{
|
||||||
|
@ -124,7 +124,7 @@ namespace WebsitePanel.WebDav.Core.Managers
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
string folder = GetFileFolder(path);
|
string folder = GetFileFolderPath(path);
|
||||||
|
|
||||||
var resourceName = GetResourceName(path);
|
var resourceName = GetResourceName(path);
|
||||||
|
|
||||||
|
@ -212,7 +212,7 @@ namespace WebsitePanel.WebDav.Core.Managers
|
||||||
path = RemoveLeadingFromPath(path, "edit");
|
path = RemoveLeadingFromPath(path, "edit");
|
||||||
path = RemoveLeadingFromPath(path, WspContext.User.OrganizationId);
|
path = RemoveLeadingFromPath(path, WspContext.User.OrganizationId);
|
||||||
|
|
||||||
string folderPath = GetFileFolder(path);
|
string folderPath = GetFileFolderPath(path);
|
||||||
|
|
||||||
OpenFolder(folderPath);
|
OpenFolder(folderPath);
|
||||||
|
|
||||||
|
@ -232,7 +232,7 @@ namespace WebsitePanel.WebDav.Core.Managers
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
string folder = GetFileFolder(path);
|
string folder = GetFileFolderPath(path);
|
||||||
|
|
||||||
var resourceName = GetResourceName(path);
|
var resourceName = GetResourceName(path);
|
||||||
|
|
||||||
|
@ -250,7 +250,7 @@ namespace WebsitePanel.WebDav.Core.Managers
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
string folder = GetFileFolder(path);
|
string folder = GetFileFolderPath(path);
|
||||||
|
|
||||||
var resourceName = GetResourceName(path);
|
var resourceName = GetResourceName(path);
|
||||||
|
|
||||||
|
@ -270,7 +270,7 @@ namespace WebsitePanel.WebDav.Core.Managers
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
string folder = GetFileFolder(path);
|
string folder = GetFileFolderPath(path);
|
||||||
|
|
||||||
var resourceName = GetResourceName(path);
|
var resourceName = GetResourceName(path);
|
||||||
|
|
||||||
|
@ -345,6 +345,7 @@ namespace WebsitePanel.WebDav.Core.Managers
|
||||||
webDavitem.SetLastModified(file.Changed);
|
webDavitem.SetLastModified(file.Changed);
|
||||||
webDavitem.ContentLength = file.Size;
|
webDavitem.ContentLength = file.Size;
|
||||||
webDavitem.AllocatedSpace = file.FRSMQuotaMB;
|
webDavitem.AllocatedSpace = file.FRSMQuotaMB;
|
||||||
|
webDavitem.Summary = file.Summary;
|
||||||
|
|
||||||
convertResult.Add(webDavitem);
|
convertResult.Add(webDavitem);
|
||||||
}
|
}
|
||||||
|
@ -372,7 +373,7 @@ namespace WebsitePanel.WebDav.Core.Managers
|
||||||
targetStream.Write(buffer, 0, n);
|
targetStream.Write(buffer, 0, n);
|
||||||
}
|
}
|
||||||
|
|
||||||
private string GetFileFolder(string path)
|
public string GetFileFolderPath(string path)
|
||||||
{
|
{
|
||||||
path = path.TrimEnd('/');
|
path = path.TrimEnd('/');
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,9 @@ namespace WebsitePanel.WebDav.Core.Owa
|
||||||
{
|
{
|
||||||
var resource = _webDavManager.GetResource(path);
|
var resource = _webDavManager.GetResource(path);
|
||||||
|
|
||||||
var readOnly = _webDavAuthorizationService.GetPermissions(WspContext.User, path).HasFlag(WebDavPermissions.Write) == false;
|
var permissions = _webDavAuthorizationService.GetPermissions(WspContext.User, path);
|
||||||
|
|
||||||
|
var readOnly = permissions.HasFlag(WebDavPermissions.Write) == false || permissions.HasFlag(WebDavPermissions.OwaEdit) == false;
|
||||||
|
|
||||||
var cFileInfo = new CheckFileInfo
|
var cFileInfo = new CheckFileInfo
|
||||||
{
|
{
|
||||||
|
|
|
@ -8,6 +8,8 @@ namespace WebsitePanel.WebDav.Core.Security.Authorization.Enums
|
||||||
Empty = 0,
|
Empty = 0,
|
||||||
None = 1,
|
None = 1,
|
||||||
Read = 2,
|
Read = 2,
|
||||||
Write = 4
|
Write = 4,
|
||||||
|
OwaRead = 8,
|
||||||
|
OwaEdit = 16
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -2,6 +2,7 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
|
using Cobalt;
|
||||||
using WebsitePanel.EnterpriseServer.Base.HostedSolution;
|
using WebsitePanel.EnterpriseServer.Base.HostedSolution;
|
||||||
using WebsitePanel.Providers.HostedSolution;
|
using WebsitePanel.Providers.HostedSolution;
|
||||||
using WebsitePanel.WebDav.Core.Config;
|
using WebsitePanel.WebDav.Core.Config;
|
||||||
|
@ -54,6 +55,17 @@ namespace WebsitePanel.WebDav.Core.Security.Authorization
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var owaEditFolders = GetOwaFoldersWithEditPermission(principal);
|
||||||
|
|
||||||
|
if (owaEditFolders.Contains(rootFolder))
|
||||||
|
{
|
||||||
|
resultPermissions |= WebDavPermissions.OwaEdit;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
resultPermissions |= WebDavPermissions.OwaRead;
|
||||||
|
}
|
||||||
|
|
||||||
return resultPermissions;
|
return resultPermissions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,5 +117,41 @@ namespace WebsitePanel.WebDav.Core.Security.Authorization
|
||||||
|
|
||||||
return groups ?? new ExchangeAccount[0];
|
return groups ?? new ExchangeAccount[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private IEnumerable<string> GetOwaFoldersWithEditPermission(WspPrincipal principal)
|
||||||
|
{
|
||||||
|
var folders = HttpContext.Current.Session != null ? HttpContext.Current.Session[WebDavAppConfigManager.Instance.SessionKeys.OwaEditFoldersSessionKey] as IEnumerable<string> : null;
|
||||||
|
|
||||||
|
if (folders != null)
|
||||||
|
{
|
||||||
|
return folders;
|
||||||
|
}
|
||||||
|
|
||||||
|
var accountsIds = new List<int>();
|
||||||
|
|
||||||
|
accountsIds.Add(principal.AccountId);
|
||||||
|
|
||||||
|
var groups = GetUserSecurityGroups(principal);
|
||||||
|
|
||||||
|
accountsIds.AddRange(groups.Select(x=>x.AccountId));
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
folders = WspContext.Services.EnterpriseStorage.GetUserEnterpriseFolderWithOwaEditPermission(principal.ItemId, accountsIds.ToArray());
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
//TODO remove try catch when es &portal will be updated
|
||||||
|
return new List<string>();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (HttpContext.Current.Session != null)
|
||||||
|
{
|
||||||
|
HttpContext.Current.Session[WebDavAppConfigManager.Instance.SessionKeys.OwaEditFoldersSessionKey] = folders;
|
||||||
|
}
|
||||||
|
|
||||||
|
return folders;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -46,6 +46,18 @@ namespace WebsitePanel.WebDavPortal
|
||||||
|
|
||||||
#region Enterprise storage
|
#region Enterprise storage
|
||||||
|
|
||||||
|
routes.MapRoute(
|
||||||
|
name: FileSystemRouteNames.SearchFiles,
|
||||||
|
url: "storage/search/{org}/{*pathPart}",
|
||||||
|
defaults: new { controller = "FileSystem", action = "SearchFiles", pathPart = UrlParameter.Optional }
|
||||||
|
);
|
||||||
|
|
||||||
|
routes.MapRoute(
|
||||||
|
name: FileSystemRouteNames.SearchFilesContent,
|
||||||
|
url: "storage/ajax/search/{org}/{*pathPart}",
|
||||||
|
defaults: new { controller = "FileSystem", action = "SearchFilesContent", pathPart = UrlParameter.Optional }
|
||||||
|
);
|
||||||
|
|
||||||
routes.MapRoute(
|
routes.MapRoute(
|
||||||
name: FileSystemRouteNames.ChangeWebDavViewType,
|
name: FileSystemRouteNames.ChangeWebDavViewType,
|
||||||
url: "storage/change-view-type/{viewType}",
|
url: "storage/change-view-type/{viewType}",
|
||||||
|
|
|
@ -21,5 +21,8 @@ namespace WebsitePanel.WebDavPortal.UI.Routes
|
||||||
public const string DeleteFiles = "DeleteFilesRoute";
|
public const string DeleteFiles = "DeleteFilesRoute";
|
||||||
|
|
||||||
public const string DownloadFile = "DownloadFileRoute";
|
public const string DownloadFile = "DownloadFileRoute";
|
||||||
|
|
||||||
|
public const string SearchFiles = "SearchFilesRoute";
|
||||||
|
public const string SearchFilesContent = "SearchFilesPostRoute";
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -60,6 +60,17 @@ tr.selected-file {
|
||||||
|
|
||||||
.table-icon {
|
.table-icon {
|
||||||
height: 30px;
|
height: 30px;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
.column-name .file-info {
|
||||||
|
display: inline-block;
|
||||||
|
padding-left: 5px;
|
||||||
|
width: 90%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-icon.search {
|
||||||
|
height: 45px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.noselect {
|
.noselect {
|
||||||
|
@ -77,6 +88,8 @@ tr.selected-file {
|
||||||
|
|
||||||
#webdav-items-table .file-link {
|
#webdav-items-table .file-link {
|
||||||
padding-left: 5px;
|
padding-left: 5px;
|
||||||
|
padding-top: 5px;
|
||||||
|
display: inline-block;
|
||||||
vertical-align: middle !important;
|
vertical-align: middle !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -86,6 +99,11 @@ tr.selected-file {
|
||||||
height: 32px;
|
height: 32px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#summary.summary {
|
||||||
|
font-size: 11px;
|
||||||
|
color: rgb(152, 152, 152);
|
||||||
|
}
|
||||||
|
|
||||||
.drag-and-drop-area input {
|
.drag-and-drop-area input {
|
||||||
/* IE 8 */
|
/* IE 8 */
|
||||||
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
|
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
|
||||||
|
@ -252,16 +270,29 @@ tr.selected-file {
|
||||||
width: 200px;
|
width: 200px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-block {
|
.breadcrumb-wsp {
|
||||||
float: right;
|
display: inline-block;
|
||||||
|
padding-top: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-block input, .search-block label {
|
.search-block {
|
||||||
|
float: right;
|
||||||
|
margin-right: 10px !important;
|
||||||
|
width: 36%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-block input{
|
||||||
|
display: inline-block;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-block label {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: initial;
|
width: initial;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.elements-container {
|
.elements-container {
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
}
|
}
|
||||||
|
@ -295,6 +326,16 @@ tr.selected-file {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.column-name {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.column-name #quota {
|
||||||
|
position: absolute;
|
||||||
|
right: 0px;
|
||||||
|
top: 20%;
|
||||||
|
}
|
||||||
|
|
||||||
/* Theme Mods */
|
/* Theme Mods */
|
||||||
|
|
||||||
input,div{border-radius:0px!important;}
|
input,div{border-radius:0px!important;}
|
||||||
|
@ -361,4 +402,10 @@ div#breadcrumb_wrapper a:last-child {
|
||||||
.header-portal-title {
|
.header-portal-title {
|
||||||
float: none;
|
float: none;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 768px) {
|
||||||
|
.navbar-right {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -35,6 +35,7 @@ using WebsitePanel.WebDavPortal.Models.Common.Enums;
|
||||||
using WebsitePanel.WebDavPortal.Models.FileSystem;
|
using WebsitePanel.WebDavPortal.Models.FileSystem;
|
||||||
using WebsitePanel.WebDavPortal.UI;
|
using WebsitePanel.WebDavPortal.UI;
|
||||||
using WebsitePanel.WebDavPortal.UI.Routes;
|
using WebsitePanel.WebDavPortal.UI.Routes;
|
||||||
|
using WebsitePanel.WebDav.Core.Extensions;
|
||||||
|
|
||||||
namespace WebsitePanel.WebDavPortal.Controllers
|
namespace WebsitePanel.WebDavPortal.Controllers
|
||||||
|
|
||||||
|
@ -143,7 +144,6 @@ namespace WebsitePanel.WebDavPortal.Controllers
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public ActionResult GetContentDetails(string org, string pathPart, [ModelBinder(typeof (JqueryDataTableModelBinder))] JqueryDataTableRequest dtRequest)
|
public ActionResult GetContentDetails(string org, string pathPart, [ModelBinder(typeof (JqueryDataTableModelBinder))] JqueryDataTableRequest dtRequest)
|
||||||
{
|
{
|
||||||
|
@ -151,16 +151,16 @@ namespace WebsitePanel.WebDavPortal.Controllers
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(dtRequest.Search.Value) == false)
|
if (string.IsNullOrEmpty(dtRequest.Search.Value) == false)
|
||||||
{
|
{
|
||||||
folderItems = _webdavManager.SearchFiles(WspContext.User.ItemId, pathPart, dtRequest.Search.Value, WspContext.User.Login, true).Select(x => new WebDavResource(null, x));
|
folderItems = _webdavManager.SearchFiles(WspContext.User.ItemId, pathPart, dtRequest.Search.Value, WspContext.User.Login, true).Cast<WebDavResource>();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
folderItems = _webdavManager.OpenFolder(pathPart).Select(x=>new WebDavResource(null, x));
|
folderItems = _webdavManager.OpenFolder(pathPart).Cast<WebDavResource>();
|
||||||
}
|
}
|
||||||
|
|
||||||
var tableItems = Mapper.Map<IEnumerable<WebDavResource>, IEnumerable<ResourceTableItemModel>>(folderItems).ToList();
|
var tableItems = Mapper.Map<IEnumerable<WebDavResource>, IEnumerable<ResourceTableItemModel>>(folderItems).ToList();
|
||||||
|
|
||||||
FillContentModel(tableItems);
|
FillContentModel(tableItems, org);
|
||||||
|
|
||||||
var orders = dtRequest.Orders.ToList();
|
var orders = dtRequest.Orders.ToList();
|
||||||
orders.Insert(0, new JqueryDataTableOrder{Column = 3, Ascending = false});
|
orders.Insert(0, new JqueryDataTableOrder{Column = 3, Ascending = false});
|
||||||
|
@ -184,6 +184,24 @@ namespace WebsitePanel.WebDavPortal.Controllers
|
||||||
return PartialView("_ResourseCollectionPartial", result);
|
return PartialView("_ResourseCollectionPartial", result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ActionResult SearchFiles(string org, string pathPart, string searchValue)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(searchValue))
|
||||||
|
{
|
||||||
|
return RedirectToRoute(FileSystemRouteNames.ShowContentPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
var model = new ModelForWebDav
|
||||||
|
{
|
||||||
|
UrlSuffix = pathPart,
|
||||||
|
Permissions = _webDavAuthorizationService.GetPermissions(WspContext.User, pathPart),
|
||||||
|
UserSettings = _userSettingsManager.GetUserSettings(WspContext.User.AccountId),
|
||||||
|
SearchValue = searchValue
|
||||||
|
};
|
||||||
|
|
||||||
|
return View("ShowContentSearchResultTable", model);
|
||||||
|
}
|
||||||
|
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public ActionResult DownloadFile(string org, string pathPart)
|
public ActionResult DownloadFile(string org, string pathPart)
|
||||||
{
|
{
|
||||||
|
@ -318,7 +336,7 @@ namespace WebsitePanel.WebDavPortal.Controllers
|
||||||
{
|
{
|
||||||
var permissions = _webDavAuthorizationService.GetPermissions(WspContext.User, pathPart);
|
var permissions = _webDavAuthorizationService.GetPermissions(WspContext.User, pathPart);
|
||||||
|
|
||||||
if (permissions.HasFlag(WebDavPermissions.Write) == false || Request.Browser.IsMobileDevice)
|
if (permissions.HasFlag(WebDavPermissions.Write) == false || permissions.HasFlag(WebDavPermissions.OwaEdit) == false || Request.Browser.IsMobileDevice)
|
||||||
{
|
{
|
||||||
return new RedirectToRouteResult(FileSystemRouteNames.ViewOfficeOnline, null);
|
return new RedirectToRouteResult(FileSystemRouteNames.ViewOfficeOnline, null);
|
||||||
}
|
}
|
||||||
|
@ -329,17 +347,17 @@ namespace WebsitePanel.WebDavPortal.Controllers
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
private void FillContentModel(IEnumerable<ResourceTableItemModel> items)
|
private void FillContentModel(IEnumerable<ResourceTableItemModel> items, string organizationId)
|
||||||
{
|
{
|
||||||
foreach (var item in items)
|
foreach (var item in items)
|
||||||
{
|
{
|
||||||
var opener = _openerManager[Path.GetExtension(item.DisplayName)];
|
var opener = _openerManager[Path.GetExtension(item.DisplayName)];
|
||||||
|
var pathPart = item.Href.AbsolutePath.Replace("/" + WspContext.User.OrganizationId, "").TrimStart('/');
|
||||||
|
|
||||||
switch (opener)
|
switch (opener)
|
||||||
{
|
{
|
||||||
case FileOpenerType.OfficeOnline:
|
case FileOpenerType.OfficeOnline:
|
||||||
{
|
{
|
||||||
var pathPart = item.Href.AbsolutePath.Replace("/" + WspContext.User.OrganizationId, "").TrimStart('/');
|
|
||||||
item.Url = string.Concat(Url.RouteUrl(FileSystemRouteNames.EditOfficeOnline, new {org = WspContext.User.OrganizationId, pathPart = ""}), pathPart);
|
item.Url = string.Concat(Url.RouteUrl(FileSystemRouteNames.EditOfficeOnline, new {org = WspContext.User.OrganizationId, pathPart = ""}), pathPart);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -350,6 +368,11 @@ namespace WebsitePanel.WebDavPortal.Controllers
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var folderPath = Server.UrlDecode(_webdavManager.GetFileFolderPath(pathPart));
|
||||||
|
|
||||||
|
item.FolderUrlAbsoluteString = Server.UrlDecode(Url.RouteUrl(FileSystemRouteNames.ShowContentPath, new {org = organizationId, pathPart = folderPath}, Request.Url.Scheme));
|
||||||
|
item.FolderUrlLocalString = Url.RouteUrl(FileSystemRouteNames.ShowContentPath, new { org = organizationId, pathPart = folderPath });
|
||||||
|
|
||||||
if (Request.Browser.IsMobileDevice)
|
if (Request.Browser.IsMobileDevice)
|
||||||
{
|
{
|
||||||
item.IsTargetBlank = false;
|
item.IsTargetBlank = false;
|
||||||
|
|
|
@ -45,7 +45,10 @@ namespace WebsitePanel.WebDavPortal.Mapping.Profiles.Webdav
|
||||||
.ForMember(ti => ti.LastModified, x => x.MapFrom(hi => hi.LastModified))
|
.ForMember(ti => ti.LastModified, x => x.MapFrom(hi => hi.LastModified))
|
||||||
.ForMember(ti => ti.LastModifiedFormated, x => x.MapFrom(hi => hi.LastModified == DateTime.MinValue ? "--" : (new WebDavResource(null, hi)).LastModified.ToString("dd/MM/yyyy hh:mm tt")))
|
.ForMember(ti => ti.LastModifiedFormated, x => x.MapFrom(hi => hi.LastModified == DateTime.MinValue ? "--" : (new WebDavResource(null, hi)).LastModified.ToString("dd/MM/yyyy hh:mm tt")))
|
||||||
|
|
||||||
|
.ForMember(ti => ti.Summary, x => x.MapFrom(hi => hi.Summary))
|
||||||
|
.ForMember(ti => ti.IsRoot, x => x.MapFrom(hi => hi.IsRootItem))
|
||||||
.ForMember(ti => ti.Size, x => x.MapFrom(hi => hi.ContentLength))
|
.ForMember(ti => ti.Size, x => x.MapFrom(hi => hi.ContentLength))
|
||||||
|
.ForMember(ti => ti.Quota, x => x.MapFrom(hi => hi.AllocatedSpace))
|
||||||
.ForMember(ti => ti.IsFolder, x => x.MapFrom(hi => hi.ItemType == ItemType.Folder));
|
.ForMember(ti => ti.IsFolder, x => x.MapFrom(hi => hi.ItemType == ItemType.Folder));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,10 +12,16 @@ namespace WebsitePanel.WebDavPortal.Models.FileSystem
|
||||||
public bool IsTargetBlank { get; set; }
|
public bool IsTargetBlank { get; set; }
|
||||||
public bool IsFolder { get; set; }
|
public bool IsFolder { get; set; }
|
||||||
public long Size { get; set; }
|
public long Size { get; set; }
|
||||||
|
public bool IsRoot { get; set; }
|
||||||
|
public long Quota { get; set; }
|
||||||
public string Type { get; set; }
|
public string Type { get; set; }
|
||||||
public DateTime LastModified { get; set; }
|
public DateTime LastModified { get; set; }
|
||||||
public string LastModifiedFormated { get; set; }
|
public string LastModifiedFormated { get; set; }
|
||||||
public string IconHref { get; set; }
|
public string IconHref { get; set; }
|
||||||
|
public string FolderUrlAbsoluteString { get; set; }
|
||||||
|
public string FolderUrlLocalString { get; set; }
|
||||||
|
public string FolderName { get; set; }
|
||||||
|
public string Summary { get; set; }
|
||||||
|
|
||||||
public override dynamic this[int index]
|
public override dynamic this[int index]
|
||||||
{
|
{
|
||||||
|
|
|
@ -150,6 +150,15 @@ namespace WebsitePanel.WebDavPortal.Resources {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to File.
|
||||||
|
/// </summary>
|
||||||
|
public static string File {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("File", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to File Upload.
|
/// Looks up a localized string similar to File Upload.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -168,6 +177,15 @@ namespace WebsitePanel.WebDavPortal.Resources {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Info.
|
||||||
|
/// </summary>
|
||||||
|
public static string Info {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Info", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to {0} items was removed..
|
/// Looks up a localized string similar to {0} items was removed..
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -258,6 +276,24 @@ namespace WebsitePanel.WebDavPortal.Resources {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Search Documents.
|
||||||
|
/// </summary>
|
||||||
|
public static string SearchDocuments {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("SearchDocuments", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Search Results.
|
||||||
|
/// </summary>
|
||||||
|
public static string SearchResults {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("SearchResults", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Select files to upload.
|
/// Looks up a localized string similar to Select files to upload.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -147,12 +147,18 @@
|
||||||
<data name="Error" xml:space="preserve">
|
<data name="Error" xml:space="preserve">
|
||||||
<value>Error</value>
|
<value>Error</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="File" xml:space="preserve">
|
||||||
|
<value>File</value>
|
||||||
|
</data>
|
||||||
<data name="FileUpload" xml:space="preserve">
|
<data name="FileUpload" xml:space="preserve">
|
||||||
<value>File Upload</value>
|
<value>File Upload</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="GigabyteShort" xml:space="preserve">
|
<data name="GigabyteShort" xml:space="preserve">
|
||||||
<value>Gb</value>
|
<value>Gb</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Info" xml:space="preserve">
|
||||||
|
<value>Info</value>
|
||||||
|
</data>
|
||||||
<data name="ItemsWasRemovedFormat" xml:space="preserve">
|
<data name="ItemsWasRemovedFormat" xml:space="preserve">
|
||||||
<value>{0} items was removed.</value>
|
<value>{0} items was removed.</value>
|
||||||
</data>
|
</data>
|
||||||
|
@ -183,6 +189,12 @@
|
||||||
<data name="Search" xml:space="preserve">
|
<data name="Search" xml:space="preserve">
|
||||||
<value>Search</value>
|
<value>Search</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SearchDocuments" xml:space="preserve">
|
||||||
|
<value>Search Documents</value>
|
||||||
|
</data>
|
||||||
|
<data name="SearchResults" xml:space="preserve">
|
||||||
|
<value>Search Results</value>
|
||||||
|
</data>
|
||||||
<data name="SelectFilesToUpload" xml:space="preserve">
|
<data name="SelectFilesToUpload" xml:space="preserve">
|
||||||
<value>Select files to upload</value>
|
<value>Select files to upload</value>
|
||||||
</data>
|
</data>
|
||||||
|
|
|
@ -1,18 +1,19 @@
|
||||||
function CheckAuthenticationExpiration(authcookieName, logoutUrl) {
|
function CheckAuthenticationExpiration(authTimeOutCookieName, authCookieName, logoutUrl) {
|
||||||
var c = $.cookie(authcookieName);
|
var c = $.cookie(authTimeOutCookieName);
|
||||||
|
|
||||||
if (c != null && c != "" && !isNaN(c)) {
|
if (c != null && c != "" && !isNaN(c)) {
|
||||||
var now = new Date();
|
var now = new Date();
|
||||||
var ms = parseInt(c, 10);
|
var ms = parseInt(c, 10);
|
||||||
var expiration = new Date().setTime(ms);
|
var expiration = new Date().setTime(ms);
|
||||||
if (now > expiration) {
|
if (now > expiration) {
|
||||||
|
$.removeCookie(authTimeOutCookieName, { path: '/' });
|
||||||
window.location.replace(logoutUrl);
|
window.location.replace(logoutUrl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function StartAuthExpirationCheckTimer(authcookieName, logoutUrl) {
|
function StartAuthExpirationCheckTimer(authTimeOutCookieName, authCookieName, logoutUrl) {
|
||||||
setInterval(function() {
|
setInterval(function() {
|
||||||
CheckAuthenticationExpiration(authcookieName, logoutUrl);
|
CheckAuthenticationExpiration(authTimeOutCookieName, authCookieName, logoutUrl);
|
||||||
}, 20000);
|
}, 20000);
|
||||||
}
|
}
|
|
@ -1,6 +1,12 @@
|
||||||
function WspFileBrowser() {
|
function WspFileBrowser() {
|
||||||
this.settings = { deletionBlockSelector: ".file-actions-menu .file-deletion", deletionUrl: "storage/files-group-action/delete" };
|
this.settings = {
|
||||||
this.table = null;
|
deletionBlockSelector: ".file-actions-menu .file-deletion",
|
||||||
|
deletionUrl: "storage/files-group-action/delete",
|
||||||
|
textDateModified: "Date modified",
|
||||||
|
textSize: "Size"
|
||||||
|
};
|
||||||
|
this.itemsTable = null;
|
||||||
|
this.searchTable = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
WspFileBrowser.prototype = {
|
WspFileBrowser.prototype = {
|
||||||
|
@ -34,7 +40,8 @@ WspFileBrowser.prototype = {
|
||||||
}).get();
|
}).get();
|
||||||
},
|
},
|
||||||
|
|
||||||
deleteSelectedItems: function(e) {
|
deleteSelectedItems: function (e) {
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
url: wsp.fileBrowser.settings.deletionUrl,
|
url: wsp.fileBrowser.settings.deletionUrl,
|
||||||
|
@ -45,7 +52,7 @@ WspFileBrowser.prototype = {
|
||||||
|
|
||||||
wsp.fileBrowser.clearDeletedItems(model.DeletedFiles);
|
wsp.fileBrowser.clearDeletedItems(model.DeletedFiles);
|
||||||
wsp.fileBrowser.refreshDeletionBlock();
|
wsp.fileBrowser.refreshDeletionBlock();
|
||||||
wsp.fileBrowser.refreshDataTable();
|
wsp.fileBrowser.refreshDataTable(wsp.fileBrowser.itemsTable);
|
||||||
|
|
||||||
wsp.dialogs.hideProcessDialog();
|
wsp.dialogs.hideProcessDialog();
|
||||||
},
|
},
|
||||||
|
@ -53,7 +60,7 @@ WspFileBrowser.prototype = {
|
||||||
wsp.messages.addErrorMessage(errorThrown);
|
wsp.messages.addErrorMessage(errorThrown);
|
||||||
|
|
||||||
wsp.fileBrowser.refreshDeletionBlock();
|
wsp.fileBrowser.refreshDeletionBlock();
|
||||||
wsp.fileBrowser.refreshDataTable();
|
wsp.fileBrowser.refreshDataTable(wsp.fileBrowser.itemsTable);
|
||||||
|
|
||||||
wsp.dialogs.hideProcessDialog();
|
wsp.dialogs.hideProcessDialog();
|
||||||
}
|
}
|
||||||
|
@ -79,17 +86,19 @@ WspFileBrowser.prototype = {
|
||||||
},
|
},
|
||||||
|
|
||||||
initDataTable: function (tableId, ajaxUrl) {
|
initDataTable: function (tableId, ajaxUrl) {
|
||||||
this.table = $(tableId).dataTable({
|
this.itemsTable = $(tableId).dataTable({
|
||||||
"ajax": ajaxUrl,
|
"ajax": ajaxUrl,
|
||||||
"processing": false,
|
"processing": false,
|
||||||
"serverSide": true,
|
"serverSide": true,
|
||||||
|
"dom": 'rtlp',
|
||||||
"columnDefs": [
|
"columnDefs": [
|
||||||
{
|
{
|
||||||
"render": function(data, type, row) {
|
"render": function(data, type, row) {
|
||||||
return '<img class="table-icon" src="' + row.IconHref + '"/>' +
|
return '<div class="column-name"><img class="table-icon" src="' + row.IconHref + '"/>' +
|
||||||
'<a href="' + row.Url + '" ' + (row.IsTargetBlank ? 'target="_blank"' : '') + ' class="file-link ' + (row.IsFolder ? 'processing-dialog':'') + '" title="' + row.DisplayName + '">' +
|
'<a href="' + row.Url + '" ' + (row.IsTargetBlank ? 'target="_blank"' : '') + ' class="file-link" title="' + row.DisplayName + '">' +
|
||||||
row.DisplayName +
|
row.DisplayName +
|
||||||
'</a>';
|
'</a>' + (row.IsRoot ? '<span id="quota">' + wsp.fileBrowser.bytesToSize(row.Size) + ' / ' + wsp.fileBrowser.bytesToSize(row.Quota) + '</span>' : '')
|
||||||
|
+'</div>';
|
||||||
},
|
},
|
||||||
"targets": 0
|
"targets": 0
|
||||||
},
|
},
|
||||||
|
@ -127,18 +136,87 @@ WspFileBrowser.prototype = {
|
||||||
|
|
||||||
$(tableId).removeClass('dataTable');
|
$(tableId).removeClass('dataTable');
|
||||||
|
|
||||||
var oTable = this.table;
|
//var oTable = this.table;
|
||||||
$(tableId+'_filter input').unbind();
|
|
||||||
$(tableId+'_filter input').bind('keyup', function (e) {
|
//$(searchInputId).bind('keyup', function (e) {
|
||||||
if (e.keyCode == 13) {
|
// if (e.keyCode == 13) {
|
||||||
oTable.fnFilter(this.value);
|
// oTable.fnFilter(this.value);
|
||||||
}
|
// }
|
||||||
});
|
//});
|
||||||
|
|
||||||
|
//$(searchInputId).keydown(function (event) {
|
||||||
|
// if (event.keyCode == 13) {
|
||||||
|
// event.preventDefault();
|
||||||
|
// return false;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// return true;
|
||||||
|
//});
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
refreshDataTable: function () {
|
initSearchDataTable: function (tableId, ajaxUrl, initSearch) {
|
||||||
if (this.table != null) {
|
|
||||||
this.table.fnDraw(false);
|
var settings = this.settings;
|
||||||
|
var classThis = this;
|
||||||
|
|
||||||
|
this.searchTable = $(tableId).dataTable({
|
||||||
|
"ajax": ajaxUrl,
|
||||||
|
"processing": false,
|
||||||
|
"serverSide": true,
|
||||||
|
"oSearch": { "sSearch": initSearch },
|
||||||
|
"dom": 'rtlp',
|
||||||
|
"columnDefs": [
|
||||||
|
{
|
||||||
|
"render": function (data, type, row) {
|
||||||
|
return '<div class="column-name">' +
|
||||||
|
'<img class="table-icon search" src="' + row.IconHref + '"/>' +
|
||||||
|
'<div class="file-info">' +
|
||||||
|
'<a href="' + row.Url + '" ' + (row.IsTargetBlank ? 'target="_blank"' : '') + ' class="file-link" title="' + row.DisplayName + '">' +
|
||||||
|
row.DisplayName +
|
||||||
|
'</a>' +
|
||||||
|
'<div id="summary" class="summary">' + (row.Summary ? (row.Summary + '').substring(0, 500) + '...' : '') + '</div>' +
|
||||||
|
'<div>' +
|
||||||
|
'<a href="' + row.FolderUrlLocalString + '" ' + 'target="_blank" class="file-link" >' +
|
||||||
|
row.FolderUrlAbsoluteString +
|
||||||
|
'</a>' +
|
||||||
|
'</div>' +
|
||||||
|
'</div>' +
|
||||||
|
'</div>';
|
||||||
|
},
|
||||||
|
"targets": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"render": function (data, type, row) {
|
||||||
|
return '<div>' +settings.textDateModified+': '+ row.LastModifiedFormated+ '</div>' +
|
||||||
|
'<div>' + settings.textSize + ': ' + classThis.bytesToSize(row.Size) + '</div>';
|
||||||
|
},
|
||||||
|
"orderable": false,
|
||||||
|
"width": "25%",
|
||||||
|
"targets": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"createdRow": function (row, data, index) {
|
||||||
|
$(row).addClass('element-container');
|
||||||
|
},
|
||||||
|
"fnPreDrawCallback": function () {
|
||||||
|
// gather info to compose a message
|
||||||
|
wsp.dialogs.showProcessDialog();
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
"fnDrawCallback": function () {
|
||||||
|
// in case your overlay needs to be put away automatically you can put it here
|
||||||
|
wsp.dialogs.hideProcessDialog();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$(tableId).removeClass('dataTable');
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
refreshDataTable: function (table) {
|
||||||
|
if (table != null) {
|
||||||
|
table.fnDraw(false);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -186,6 +264,14 @@ WspFileBrowser.prototype = {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
bytesToSize: function(bytes) {
|
||||||
|
if (bytes == 0) return '0 Byte';
|
||||||
|
var k = 1024;
|
||||||
|
var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
|
||||||
|
var i = Math.floor(Math.log(bytes) / Math.log(k));
|
||||||
|
return (bytes / Math.pow(k, i)).toPrecision(3) + ' ' + sizes[i];
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -53,9 +53,3 @@ else
|
||||||
</script>
|
</script>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@section popups
|
|
||||||
{
|
|
||||||
@Html.Partial("_ProcessDialog", null)
|
|
||||||
@Html.Partial("_ConfirmDialog")
|
|
||||||
}
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
@using WebsitePanel.WebDavPortal.Resources
|
||||||
|
@using WebsitePanel.WebDavPortal.UI.Routes
|
||||||
|
@model WebsitePanel.WebDavPortal.Models.ModelForWebDav
|
||||||
|
|
||||||
|
|
||||||
|
@Html.Partial("_ShowContentTopMenu", Model)
|
||||||
|
|
||||||
|
<div class="prevent-deselect container">
|
||||||
|
<table id="search-items-table" class="display table table-striped table-bordered noselect" cellspacing="0" width="100%">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>@UI.File</th>
|
||||||
|
<th>@UI.Details</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@section scripts
|
||||||
|
{
|
||||||
|
<script>
|
||||||
|
$(document).ready(function() {
|
||||||
|
wsp.fileBrowser.setSettings({ deletionUrl: "@Url.RouteUrl(FileSystemRouteNames.DeleteFiles)" });
|
||||||
|
wsp.fileBrowser.initSearchDataTable('#search-items-table', '@Url.RouteUrl(FileSystemRouteNames.ShowContentDetails)', '@Model.SearchValue');
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
}
|
||||||
|
|
|
@ -3,21 +3,6 @@
|
||||||
@using WebsitePanel.WebDavPortal.UI.Routes
|
@using WebsitePanel.WebDavPortal.UI.Routes
|
||||||
@model WebsitePanel.WebDavPortal.Models.ModelForWebDav
|
@model WebsitePanel.WebDavPortal.Models.ModelForWebDav
|
||||||
|
|
||||||
<div class="container">
|
|
||||||
|
|
||||||
<div class="search-block navbar-right">
|
|
||||||
<div>
|
|
||||||
@using (Html.BeginRouteForm(FileSystemRouteNames.ShowContentPath))
|
|
||||||
{
|
|
||||||
<label>
|
|
||||||
@UI.Search:
|
|
||||||
</label>
|
|
||||||
@Html.TextBoxFor(x => x.SearchValue, new { @class = "form-control input-sm"})
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -15,8 +15,3 @@
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@section popups
|
|
||||||
{
|
|
||||||
@Html.Partial("_ProcessDialog", null)
|
|
||||||
@Html.Partial("_ConfirmDialog")
|
|
||||||
}
|
|
|
@ -10,42 +10,69 @@
|
||||||
@if (Model != null)
|
@if (Model != null)
|
||||||
{
|
{
|
||||||
string header = WspContext.User.OrganizationId;
|
string header = WspContext.User.OrganizationId;
|
||||||
<a href="/@header/" class="processing-dialog">@header</a>
|
string[] elements = string.IsNullOrEmpty(Model.UrlSuffix)? new string[0]: Model.UrlSuffix.Split(new[] { "/" }, StringSplitOptions.RemoveEmptyEntries);
|
||||||
string[] elements = Model.UrlSuffix.Split(new[] { "/" }, StringSplitOptions.RemoveEmptyEntries);
|
|
||||||
for (int i = 0; i < elements.Length; i++)
|
<div class="breadcrumb-wsp">
|
||||||
{
|
@if (String.IsNullOrEmpty(Model.SearchValue))
|
||||||
<span style="top: 2px;"> / </span>
|
{
|
||||||
<a href="@string.Concat("/" + header + "/", string.Join("/", elements.Take(i + 1)))" class="processing-dialog">@elements[i]</a>
|
<a href="/@header/" class="processing-dialog">@header</a>
|
||||||
}
|
|
||||||
}
|
for (int i = 0; i < elements.Length; i++)
|
||||||
</div>
|
{
|
||||||
<div class="container file-actions-menu prevent-deselect">
|
<span style="top: 2px;"> / </span>
|
||||||
@if (Model.Permissions.HasFlag(WebDavPermissions.Write))
|
<a href="@string.Concat("/" + header + "/", string.Join("/", elements.Take(i + 1)))" class="processing-dialog">@elements[i]</a>
|
||||||
{
|
}
|
||||||
<div class="file-deletion navbar-left">
|
}
|
||||||
<a id="delete-button" class="btn btn-danger btn-sm active" role="button"
|
else
|
||||||
data-target="#confirm-dialog"
|
{
|
||||||
data-target-positive-button-text="@UI.Delete"
|
<a href="@Url.RouteUrl(FileSystemRouteNames.ShowContentPath)" class="processing-dialog">@UI.SearchResults</a>
|
||||||
data-target-title-text="@UI.DeleteFileQuestion"
|
}
|
||||||
data-target-content="@UI.DialogsContentConfrimFileDeletion">@UI.Delete</a>
|
</div>
|
||||||
|
|
||||||
|
<div class="search-block navbar-right">
|
||||||
|
<div>
|
||||||
|
@using (Html.BeginRouteForm(FileSystemRouteNames.SearchFiles, FormMethod.Post))
|
||||||
|
{
|
||||||
|
<div>
|
||||||
|
<label>
|
||||||
|
@UI.SearchDocuments:
|
||||||
|
</label>
|
||||||
|
@Html.TextBox("searchValue", Model.SearchValue, new { @class = "form-control input-sm" })
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
</div>
|
||||||
<div class="file-upload navbar-right">
|
@if (string.IsNullOrEmpty(Model.SearchValue))
|
||||||
@if (Request.Browser.IsMobileDevice == false)
|
{
|
||||||
|
<div class="container file-actions-menu prevent-deselect">
|
||||||
|
@if (Model.Permissions.HasFlag(WebDavPermissions.Write))
|
||||||
{
|
{
|
||||||
<div class="btn-toolbar change-view-block" role="toolbar">
|
<div class="file-deletion navbar-left">
|
||||||
<div class="btn-group">
|
<a id="delete-button" class="btn btn-danger btn-sm active" role="button"
|
||||||
<a class="btn btn-default" title="@UI.Details" href="@Url.RouteUrl(FileSystemRouteNames.ChangeWebDavViewType, new { viewType = FolderViewTypes.BigIcons, org = WspContext.User.OrganizationId, pathPart = Model.UrlSuffix })"><span class="glyphicon glyphicon-th-large" aria-hidden="true"></span></a>
|
data-target="#confirm-dialog"
|
||||||
<a class="btn btn-default" title="@UI.Table" href="@Url.RouteUrl(FileSystemRouteNames.ChangeWebDavViewType, new { viewType = FolderViewTypes.Table, org = WspContext.User.OrganizationId, pathPart = Model.UrlSuffix })"><span class="glyphicon glyphicon-th-list" aria-hidden="true"></span></a>
|
data-target-positive-button-text="@UI.Delete"
|
||||||
</div>
|
data-target-title-text="@UI.DeleteFileQuestion"
|
||||||
|
data-target-content="@UI.DialogsContentConfrimFileDeletion">@UI.Delete</a>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
@if (Model.Permissions.HasFlag(WebDavPermissions.Write))
|
<div class="file-upload navbar-right">
|
||||||
{
|
@if (Request.Browser.IsMobileDevice == false)
|
||||||
<a id="upload-button" class="btn btn-success btn-sm active" href="@Url.RouteUrl(FileSystemRouteNames.UploadFile)" role="button">@UI.FileUpload</a>
|
{
|
||||||
}
|
<div class="btn-toolbar change-view-block" role="toolbar">
|
||||||
|
<div class="btn-group">
|
||||||
|
<a class="btn btn-default" title="@UI.Details" href="@Url.RouteUrl(FileSystemRouteNames.ChangeWebDavViewType, new {viewType = FolderViewTypes.BigIcons, org = WspContext.User.OrganizationId, pathPart = Model.UrlSuffix})"><span class="glyphicon glyphicon-th-large" aria-hidden="true"></span></a>
|
||||||
|
<a class="btn btn-default" title="@UI.Table" href="@Url.RouteUrl(FileSystemRouteNames.ChangeWebDavViewType, new {viewType = FolderViewTypes.Table, org = WspContext.User.OrganizationId, pathPart = Model.UrlSuffix})"><span class="glyphicon glyphicon-th-list" aria-hidden="true"></span></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
|
||||||
|
@if (Model.Permissions.HasFlag(WebDavPermissions.Write))
|
||||||
|
{
|
||||||
|
<a id="upload-button" class="btn btn-success btn-sm active" href="@Url.RouteUrl(FileSystemRouteNames.UploadFile)" role="button">@UI.FileUpload</a>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
}
|
||||||
</div>
|
|
|
@ -47,6 +47,9 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="prevent-deselect">
|
<div class="prevent-deselect">
|
||||||
|
@Html.Partial("_ProcessDialog", null)
|
||||||
|
@Html.Partial("_ConfirmDialog")
|
||||||
|
|
||||||
@RenderSection("popups", required: false)
|
@RenderSection("popups", required: false)
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -62,9 +65,9 @@
|
||||||
@Scripts.Render("~/bundles/authScripts")
|
@Scripts.Render("~/bundles/authScripts")
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function () {
|
||||||
StartAuthExpirationCheckTimer("@WebDavAppConfigManager.Instance.AuthTimeoutCookieName", "@Url.RouteUrl(AccountRouteNames.Logout)");
|
StartAuthExpirationCheckTimer("@WebDavAppConfigManager.Instance.AuthTimeoutCookieName", "@FormsAuthentication.FormsCookieName", "@Url.RouteUrl(AccountRouteNames.Logout)");
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -52,6 +52,7 @@
|
||||||
<add key="ResourseRenderCountSessionKey" value="ResourseRenderCount" />
|
<add key="ResourseRenderCountSessionKey" value="ResourseRenderCount" />
|
||||||
<add key="ItemIdSessionKey" value="ItemId" />
|
<add key="ItemIdSessionKey" value="ItemId" />
|
||||||
<add key="UserGroupsKey" value="UserGroups" />
|
<add key="UserGroupsKey" value="UserGroups" />
|
||||||
|
<add key="OwaEditFoldersSession" value="OwaEditFolders"/>
|
||||||
</sessionKeys>
|
</sessionKeys>
|
||||||
<fileIcons defaultPath="~/Content/Images/other-icon.png" folderPath="~/Content/Images/folder_100x100.png">
|
<fileIcons defaultPath="~/Content/Images/other-icon.png" folderPath="~/Content/Images/folder_100x100.png">
|
||||||
<add extension=".txt" path="~/Content/Images/txt-icon.png" />
|
<add extension=".txt" path="~/Content/Images/txt-icon.png" />
|
||||||
|
|
|
@ -459,6 +459,7 @@
|
||||||
<Content Include="Views\FileSystem\_ShowContentTopMenu.cshtml" />
|
<Content Include="Views\FileSystem\_ShowContentTopMenu.cshtml" />
|
||||||
<Content Include="Views\FileSystem\_ShowContentBigIcons.cshtml" />
|
<Content Include="Views\FileSystem\_ShowContentBigIcons.cshtml" />
|
||||||
<Content Include="Views\FileSystem\UploadFiles.cshtml" />
|
<Content Include="Views\FileSystem\UploadFiles.cshtml" />
|
||||||
|
<Content Include="Views\FileSystem\ShowContentSearchResultTable.cshtml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="Models\FileSystem\Enums\" />
|
<Folder Include="Models\FileSystem\Enums\" />
|
||||||
|
|
|
@ -135,6 +135,7 @@
|
||||||
<Control key="enterprisestorage_folders" />
|
<Control key="enterprisestorage_folders" />
|
||||||
<Control key="create_enterprisestorage_folder" general_key="enterprisestorage_folders" />
|
<Control key="create_enterprisestorage_folder" general_key="enterprisestorage_folders" />
|
||||||
<Control key="enterprisestorage_folder_settings" general_key="enterprisestorage_folders" />
|
<Control key="enterprisestorage_folder_settings" general_key="enterprisestorage_folders" />
|
||||||
|
<Control key="enterprisestorage_folder_settings_general" general_key="enterprisestorage_folders" />
|
||||||
|
|
||||||
<Control key="enterprisestorage_drive_maps" />
|
<Control key="enterprisestorage_drive_maps" />
|
||||||
<Control key="create_enterprisestorage_drive_map" general_key="enterprisestorage_drive_maps" />
|
<Control key="create_enterprisestorage_drive_map" general_key="enterprisestorage_drive_maps" />
|
||||||
|
|
|
@ -563,6 +563,9 @@
|
||||||
<Control key="enterprisestorage_folders" src="WebsitePanel/ExchangeServer/EnterpriseStorageFolders.ascx" title="Enterprise Storage Folders" type="View" />
|
<Control key="enterprisestorage_folders" src="WebsitePanel/ExchangeServer/EnterpriseStorageFolders.ascx" title="Enterprise Storage Folders" type="View" />
|
||||||
<Control key="create_enterprisestorage_folder" src="WebsitePanel/ExchangeServer/EnterpriseStorageCreateFolder.ascx" title="Create New ES Folder" type="View" />
|
<Control key="create_enterprisestorage_folder" src="WebsitePanel/ExchangeServer/EnterpriseStorageCreateFolder.ascx" title="Create New ES Folder" type="View" />
|
||||||
<Control key="enterprisestorage_folder_settings" src="WebsitePanel/ExchangeServer/EnterpriseStorageFolderGeneralSettings.ascx" title="Edit ES Folder" type="View" />
|
<Control key="enterprisestorage_folder_settings" src="WebsitePanel/ExchangeServer/EnterpriseStorageFolderGeneralSettings.ascx" title="Edit ES Folder" type="View" />
|
||||||
|
<Control key="enterprisestorage_folder_settings_folder_permissions" src="WebsitePanel/ExchangeServer/EnterpriseStorageFolderSettingsFolderPermissions.ascx" title="Edit ES Folder" type="View" />
|
||||||
|
<Control key="enterprisestorage_folder_settings_owa_editing" src="WebsitePanel/ExchangeServer/EnterpriseStorageFolderSettingsOwaEditing.ascx" title="Edit ES Folder" type="View" />
|
||||||
|
|
||||||
<Control key="enterprisestorage_drive_maps" src="WebsitePanel/ExchangeServer/EnterpriseStorageDriveMaps.ascx" title="Enterprise Storage Drive Maps" type="View" />
|
<Control key="enterprisestorage_drive_maps" src="WebsitePanel/ExchangeServer/EnterpriseStorageDriveMaps.ascx" title="Enterprise Storage Drive Maps" type="View" />
|
||||||
<Control key="create_enterprisestorage_drive_map" src="WebsitePanel/ExchangeServer/EnterpriseStorageCreateDriveMap.ascx" title="Create New ES Drive Map" type="View" />
|
<Control key="create_enterprisestorage_drive_map" src="WebsitePanel/ExchangeServer/EnterpriseStorageCreateDriveMap.ascx" title="Create New ES Drive Map" type="View" />
|
||||||
|
|
||||||
|
|
|
@ -5656,6 +5656,12 @@
|
||||||
<data name="ERROR.RDSSESSIONHOST_CERTIFICATE_NOT_INSTALLED" xml:space="preserve">
|
<data name="ERROR.RDSSESSIONHOST_CERTIFICATE_NOT_INSTALLED" xml:space="preserve">
|
||||||
<value>Session host certificate not installed</value>
|
<value>Session host certificate not installed</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="ERROR.RDSSERVER_NOT_ADDED" xml:space="preserve">
|
||||||
|
<value>RDS Server not added</value>
|
||||||
|
</data>
|
||||||
|
<data name="Success.RDSSESSIONHOST_CERTIFICATE_INSTALLED" xml:space="preserve">
|
||||||
|
<value>Session host certificate has been installed</value>
|
||||||
|
</data>
|
||||||
<data name="ERROR.RDSCOLLECTIONSETTINGS_NOT_UPDATES" xml:space="preserve">
|
<data name="ERROR.RDSCOLLECTIONSETTINGS_NOT_UPDATES" xml:space="preserve">
|
||||||
<value>RDS Collection settings not updated</value>
|
<value>RDS Collection settings not updated</value>
|
||||||
</data>
|
</data>
|
||||||
|
|
|
@ -120,6 +120,9 @@
|
||||||
<data name="btnAddRDSServer.Text" xml:space="preserve">
|
<data name="btnAddRDSServer.Text" xml:space="preserve">
|
||||||
<value>Add RDS Server</value>
|
<value>Add RDS Server</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="gvPopupStatus.HeaderText" xml:space="preserve">
|
||||||
|
<value>Status</value>
|
||||||
|
</data>
|
||||||
<data name="gvRDSServers.Empty" xml:space="preserve">
|
<data name="gvRDSServers.Empty" xml:space="preserve">
|
||||||
<value>The list of RDS Servers is empty.<br><br>To add a new Server click "Add RDS Sever" button.</value>
|
<value>The list of RDS Servers is empty.<br><br>To add a new Server click "Add RDS Sever" button.</value>
|
||||||
</data>
|
</data>
|
||||||
|
|
|
@ -52,11 +52,16 @@ namespace WebsitePanel.Portal
|
||||||
{
|
{
|
||||||
rdsServers = ES.Services.RDS.GetRdsServersPaged("", filterValue, sortColumn, startRowIndex, maximumRows);
|
rdsServers = ES.Services.RDS.GetRdsServersPaged("", filterValue, sortColumn, startRowIndex, maximumRows);
|
||||||
|
|
||||||
return rdsServers.Servers;
|
foreach (var rdsServer in rdsServers.Servers)
|
||||||
//return new RdsServer[] { new RdsServer { Name = "rds.1.server", FqdName = "", Address = "127.0.0.1" },
|
{
|
||||||
// new RdsServer { Name = "rds.2.server", FqdName = "", Address = "127.0.0.2" },
|
if (rdsServer.ItemId.HasValue)
|
||||||
// new RdsServer { Name = "rds.3.server", FqdName = "", Address = "127.0.0.3" },
|
{
|
||||||
// new RdsServer { Name = "rds.4.server", FqdName = "", Address = "127.0.0.4" }};
|
rdsServer.Status = ES.Services.RDS.GetRdsServerStatus(rdsServer.ItemId.Value, rdsServer.FqdName);
|
||||||
|
rdsServer.SslAvailable = ES.Services.RDS.GetRdsCertificateByItemId(rdsServer.ItemId.Value) != null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return rdsServers.Servers;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int GetOrganizationRdsServersPagedCount(int itemId, string filterValue)
|
public int GetOrganizationRdsServersPagedCount(int itemId, string filterValue)
|
||||||
|
|
|
@ -168,4 +168,7 @@
|
||||||
<data name="rbtnQuotaSoft" xml:space="preserve">
|
<data name="rbtnQuotaSoft" xml:space="preserve">
|
||||||
<value>Soft</value>
|
<value>Soft</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="colFolderGeneralSettings.Text" xml:space="preserve">
|
||||||
|
<value>General Settings</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
|
@ -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 folder settings...');</value>
|
||||||
|
</data>
|
||||||
|
<data name="btnSave.Text" xml:space="preserve">
|
||||||
|
<value>Save Changes</value>
|
||||||
|
</data>
|
||||||
|
<data name="colFolderPermissions.Text" xml:space="preserve">
|
||||||
|
<value>Folder Permissions</value>
|
||||||
|
</data>
|
||||||
|
<data name="locPermissionsSection.Text" xml:space="preserve">
|
||||||
|
<value>Permissions</value>
|
||||||
|
</data>
|
||||||
|
<data name="locTitle.Text" xml:space="preserve">
|
||||||
|
<value>Edit Folder</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
|
@ -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 folder settings...');</value>
|
||||||
|
</data>
|
||||||
|
<data name="btnSave.Text" xml:space="preserve">
|
||||||
|
<value>Save Changes</value>
|
||||||
|
</data>
|
||||||
|
<data name="colOwaEditing.Text" xml:space="preserve">
|
||||||
|
<value>Office Web App Editing</value>
|
||||||
|
</data>
|
||||||
|
<data name="locOwaEditingSection.Text" xml:space="preserve">
|
||||||
|
<value>Users And Groups</value>
|
||||||
|
</data>
|
||||||
|
<data name="locTitle.Text" xml:space="preserve">
|
||||||
|
<value>Edit Folder</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
|
@ -1,8 +1,11 @@
|
||||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="EnterpriseStorageFolderGeneralSettings.ascx.cs" Inherits="WebsitePanel.Portal.ExchangeServer.EnterpriseStorageFolderGeneralSettings" %>
|
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="EnterpriseStorageFolderGeneralSettings.ascx.cs" Inherits="WebsitePanel.Portal.ExchangeServer.EnterpriseStorageFolderGeneralSettings" %>
|
||||||
|
|
||||||
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
|
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
|
||||||
<%@ Register Src="UserControls/EnterpriseStoragePermissions.ascx" TagName="ESPermissions" TagPrefix="wsp"%>
|
<%@ Register Src="UserControls/EnterpriseStoragePermissions.ascx" TagName="ESPermissions" TagPrefix="wsp"%>
|
||||||
<%@ Register TagPrefix="wsp" TagName="CollapsiblePanel" Src="../UserControls/CollapsiblePanel.ascx" %>
|
<%@ Register TagPrefix="wsp" TagName="CollapsiblePanel" Src="../UserControls/CollapsiblePanel.ascx" %>
|
||||||
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
|
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
|
||||||
|
<%@ Register TagPrefix="wsp" Namespace="WebsitePanel.Portal.ExchangeServer.UserControls" Assembly="WebsitePanel.Portal.Modules" %>
|
||||||
|
<%@ Register Src="UserControls/EnterpriseStorageEditFolderTabs.ascx" TagName="CollectionTabs" TagPrefix="wsp" %>
|
||||||
|
|
||||||
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/>
|
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/>
|
||||||
|
|
||||||
|
@ -16,62 +19,62 @@
|
||||||
<asp:Image ID="Image1" SkinID="ExchangeList48" runat="server" />
|
<asp:Image ID="Image1" SkinID="ExchangeList48" runat="server" />
|
||||||
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Edit Folder"></asp:Localize>
|
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Edit Folder"></asp:Localize>
|
||||||
|
|
||||||
<asp:Literal ID="litFolderName" runat="server" Text="Folder" />
|
<asp:Literal ID="litFolderName" runat="server" Text="Folder 32" />
|
||||||
</div>
|
</div>
|
||||||
<div class="FormBody">
|
<div class="FormBody">
|
||||||
|
<wsp:CollectionTabs id="tabs" runat="server" SelectedTab="enterprisestorage_folder_settings" />
|
||||||
<wsp:SimpleMessageBox id="messageBox" runat="server" />
|
<wsp:SimpleMessageBox id="messageBox" runat="server" />
|
||||||
<table>
|
|
||||||
<tr>
|
<wsp:CollapsiblePanel id="colFolderGeneralSettings" runat="server"
|
||||||
<td class="FormLabel150"><asp:Localize ID="locFolderName" runat="server" meta:resourcekey="locFolderName" Text="Folder Name:"></asp:Localize></td>
|
TargetControlID="panelFolderGeneralSettings" meta:resourcekey="colFolderGeneralSettings" Text="">
|
||||||
<td>
|
</wsp:CollapsiblePanel>
|
||||||
<asp:TextBox ID="txtFolderName" runat="server" CssClass="HugeTextBox200" ></asp:TextBox>
|
|
||||||
<asp:RequiredFieldValidator ID="valRequireFolderName" runat="server" meta:resourcekey="valRequireFolderName" ControlToValidate="txtFolderName"
|
<asp:Panel runat="server" ID="panelFolderGeneralSettings">
|
||||||
ErrorMessage="Enter Folder Name" ValidationGroup="EditFolder" Display="Dynamic" Text="*" SetFocusOnError="True"></asp:RequiredFieldValidator>
|
<table>
|
||||||
</td>
|
<tr>
|
||||||
</tr>
|
<td class="FormLabel150"><asp:Localize ID="locFolderName" runat="server" meta:resourcekey="locFolderName" Text="Folder Name:"></asp:Localize></td>
|
||||||
<tr>
|
<td>
|
||||||
<td class="FormLabel150"><asp:Localize ID="locFolderSize" runat="server" meta:resourcekey="locFolderSize" Text="Folder Limit Size (Gb):"></asp:Localize></td>
|
<asp:TextBox ID="txtFolderName" runat="server" CssClass="HugeTextBox200" ></asp:TextBox>
|
||||||
<td>
|
<asp:RequiredFieldValidator ID="valRequireFolderName" runat="server" meta:resourcekey="valRequireFolderName" ControlToValidate="txtFolderName"
|
||||||
<asp:TextBox ID="txtFolderSize" runat="server" CssClass="HugeTextBox200"></asp:TextBox>
|
ErrorMessage="Enter Folder Name" ValidationGroup="EditFolder" Display="Dynamic" Text="*" SetFocusOnError="True"></asp:RequiredFieldValidator>
|
||||||
<asp:RequiredFieldValidator ID="valRequireFolderSize" runat="server" meta:resourcekey="valRequireFolderSize" ControlToValidate="txtFolderSize"
|
</td>
|
||||||
ErrorMessage="Enter Folder Size" ValidationGroup="EditFolder" Display="Dynamic" Text="*" SetFocusOnError="True"></asp:RequiredFieldValidator>
|
</tr>
|
||||||
<asp:RangeValidator ID="rangeFolderSize" runat="server" ControlToValidate="txtFolderSize" MaximumValue="99999999" MinimumValue="0.01" Type="Double"
|
<tr>
|
||||||
ValidationGroup="EditFolder" Display="Dynamic" Text="*" SetFocusOnError="True"
|
<td class="FormLabel150"><asp:Localize ID="locFolderSize" runat="server" meta:resourcekey="locFolderSize" Text="Folder Limit Size (Gb):"></asp:Localize></td>
|
||||||
ErrorMessage="The quota you’ve entered exceeds the available quota for tenant" />
|
<td>
|
||||||
</td>
|
<asp:TextBox ID="txtFolderSize" runat="server" CssClass="HugeTextBox200"></asp:TextBox>
|
||||||
</tr>
|
<asp:RequiredFieldValidator ID="valRequireFolderSize" runat="server" meta:resourcekey="valRequireFolderSize" ControlToValidate="txtFolderSize"
|
||||||
<tr>
|
ErrorMessage="Enter Folder Size" ValidationGroup="EditFolder" Display="Dynamic" Text="*" SetFocusOnError="True"></asp:RequiredFieldValidator>
|
||||||
<td class="FormLabel150"><asp:Localize ID="locQuotaType" runat="server" meta:resourcekey="locQuotaType" Text="Quota Type:"></asp:Localize></td>
|
<asp:RangeValidator ID="rangeFolderSize" runat="server" ControlToValidate="txtFolderSize" MaximumValue="99999999" MinimumValue="0.01" Type="Double"
|
||||||
<td class="FormRBtnL">
|
ValidationGroup="EditFolder" Display="Dynamic" Text="*" SetFocusOnError="True"
|
||||||
<asp:RadioButton ID="rbtnQuotaSoft" runat="server" meta:resourcekey="rbtnQuotaSoft" Text="Soft" GroupName="QuotaType" Checked="true" />
|
ErrorMessage="The quota you’ve entered exceeds the available quota for tenant" />
|
||||||
<asp:RadioButton ID="rbtnQuotaHard" runat="server" meta:resourcekey="rbtnQuotaHard" Text="Hard" GroupName="QuotaType" />
|
</td>
|
||||||
<br />
|
</tr>
|
||||||
<br />
|
<tr>
|
||||||
</td>
|
<td class="FormLabel150"><asp:Localize ID="locQuotaType" runat="server" meta:resourcekey="locQuotaType" Text="Quota Type:"></asp:Localize></td>
|
||||||
</tr>
|
<td class="FormRBtnL">
|
||||||
<tr>
|
<asp:RadioButton ID="rbtnQuotaSoft" runat="server" meta:resourcekey="rbtnQuotaSoft" Text="Soft" GroupName="QuotaType" Checked="true" />
|
||||||
<td class="FormLabel150"><asp:Localize ID="locFolderUrl" runat="server" meta:resourcekey="locFolderUrl" Text="Folder Url:"></asp:Localize></td>
|
<asp:RadioButton ID="rbtnQuotaHard" runat="server" meta:resourcekey="rbtnQuotaHard" Text="Hard" GroupName="QuotaType" />
|
||||||
<td><asp:Label runat="server" ID="lblFolderUrl" /></td>
|
<br />
|
||||||
</tr>
|
<br />
|
||||||
<tr><td> </td></tr>
|
</td>
|
||||||
<tr>
|
</tr>
|
||||||
<td class="FormLabel150"><asp:Localize ID="locDirectoryBrowsing" runat="server" meta:resourcekey="locDirectoryBrowsing" Text="Enable Directory Browsing:"></asp:Localize></td>
|
<tr>
|
||||||
<td>
|
<td class="FormLabel150"><asp:Localize ID="locFolderUrl" runat="server" meta:resourcekey="locFolderUrl" Text="Folder Url:"></asp:Localize></td>
|
||||||
<asp:CheckBox id="chkDirectoryBrowsing" runat="server"></asp:CheckBox>
|
<td><asp:Label runat="server" ID="lblFolderUrl" /></td>
|
||||||
</td>
|
</tr>
|
||||||
</tr>
|
<tr><td> </td></tr>
|
||||||
<tr><td> </td></tr>
|
<tr>
|
||||||
<tr>
|
<td class="FormLabel150"><asp:Localize ID="locDirectoryBrowsing" runat="server" meta:resourcekey="locDirectoryBrowsing" Text="Enable Directory Browsing:"></asp:Localize></td>
|
||||||
<td colspan="2">
|
<td>
|
||||||
<fieldset id="PermissionsPanel" runat="server">
|
<asp:CheckBox id="chkDirectoryBrowsing" runat="server"></asp:CheckBox>
|
||||||
<legend><asp:Localize ID="PermissionsSection" runat="server" meta:resourcekey="locPermissionsSection" Text="Permissions"></asp:Localize></legend>
|
</td>
|
||||||
<wsp:ESPermissions id="permissions" runat="server" />
|
</tr>
|
||||||
</fieldset>
|
<tr><td> </td></tr>
|
||||||
</tr>
|
|
||||||
<tr><td> </td></tr>
|
</table>
|
||||||
|
</asp:Panel>
|
||||||
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<div class="FormFooterClean">
|
<div class="FormFooterClean">
|
||||||
<asp:Button id="btnSave" runat="server" Text="Save Changes" CssClass="Button1" meta:resourcekey="btnSave" ValidationGroup="EditFolder" OnClick="btnSave_Click"></asp:Button>
|
<asp:Button id="btnSave" runat="server" Text="Save Changes" CssClass="Button1" meta:resourcekey="btnSave" ValidationGroup="EditFolder" OnClick="btnSave_Click"></asp:Button>
|
||||||
<asp:ValidationSummary ID="valSummary" runat="server" ShowMessageBox="True" ShowSummary="False" ValidationGroup="EditFolder" />
|
<asp:ValidationSummary ID="valSummary" runat="server" ShowMessageBox="True" ShowSummary="False" ValidationGroup="EditFolder" />
|
||||||
|
|
|
@ -107,11 +107,7 @@ namespace WebsitePanel.Portal.ExchangeServer
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
var esPermissions = ES.Services.EnterpriseStorage.GetEnterpriseFolderPermissions(PanelRequest.ItemID,folder.Name);
|
|
||||||
|
|
||||||
chkDirectoryBrowsing.Checked = ES.Services.EnterpriseStorage.GetDirectoryBrowseEnabled(PanelRequest.ItemID, folder.Url);
|
chkDirectoryBrowsing.Checked = ES.Services.EnterpriseStorage.GetDirectoryBrowseEnabled(PanelRequest.ItemID, folder.Url);
|
||||||
|
|
||||||
permissions.SetPermissions(esPermissions);
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
@ -159,10 +155,9 @@ namespace WebsitePanel.Portal.ExchangeServer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ES.Services.EnterpriseStorage.SetEnterpriseFolderSettings(
|
ES.Services.EnterpriseStorage.SetEnterpriseFolderGeneralSettings(
|
||||||
PanelRequest.ItemID,
|
PanelRequest.ItemID,
|
||||||
folder,
|
folder,
|
||||||
permissions.GetPemissions(),
|
|
||||||
chkDirectoryBrowsing.Checked,
|
chkDirectoryBrowsing.Checked,
|
||||||
(int)(decimal.Parse(txtFolderSize.Text) * OneGb),
|
(int)(decimal.Parse(txtFolderSize.Text) * OneGb),
|
||||||
rbtnQuotaSoft.Checked ? QuotaType.Soft : QuotaType.Hard);
|
rbtnQuotaSoft.Checked ? QuotaType.Soft : QuotaType.Hard);
|
||||||
|
|
|
@ -1,31 +1,3 @@
|
||||||
// Copyright (c) 2015, 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.
|
||||||
|
@ -76,6 +48,15 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::System.Web.UI.WebControls.Literal litFolderName;
|
protected global::System.Web.UI.WebControls.Literal litFolderName;
|
||||||
|
|
||||||
|
/// <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.EnterpriseStorageEditFolderTabs tabs;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// messageBox control.
|
/// messageBox control.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -85,6 +66,24 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
|
protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// colFolderGeneralSettings control.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Auto-generated field.
|
||||||
|
/// To modify move field declaration from designer file to code-behind file.
|
||||||
|
/// </remarks>
|
||||||
|
protected global::WebsitePanel.Portal.CollapsiblePanel colFolderGeneralSettings;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// panelFolderGeneralSettings 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 panelFolderGeneralSettings;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// locFolderName control.
|
/// locFolderName control.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -211,33 +210,6 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::System.Web.UI.WebControls.CheckBox chkDirectoryBrowsing;
|
protected global::System.Web.UI.WebControls.CheckBox chkDirectoryBrowsing;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// PermissionsPanel 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.HtmlGenericControl PermissionsPanel;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// PermissionsSection 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 PermissionsSection;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// permissions 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.EnterpriseStoragePermissions permissions;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// btnSave control.
|
/// btnSave control.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -0,0 +1,55 @@
|
||||||
|
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="EnterpriseStorageFolderSettingsFolderPermissions.ascx.cs" Inherits="WebsitePanel.Portal.ExchangeServer.EnterpriseStorageFolderSettingsFolderPermissions" %>
|
||||||
|
|
||||||
|
|
||||||
|
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
|
||||||
|
<%@ Register Src="UserControls/EnterpriseStoragePermissions.ascx" TagName="ESPermissions" TagPrefix="wsp"%>
|
||||||
|
<%@ Register TagPrefix="wsp" TagName="CollapsiblePanel" Src="../UserControls/CollapsiblePanel.ascx" %>
|
||||||
|
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
|
||||||
|
<%@ Register TagPrefix="wsp" Namespace="WebsitePanel.Portal.ExchangeServer.UserControls" Assembly="WebsitePanel.Portal.Modules" %>
|
||||||
|
<%@ Register Src="UserControls/EnterpriseStorageEditFolderTabs.ascx" TagName="CollectionTabs" TagPrefix="wsp" %>
|
||||||
|
|
||||||
|
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/>
|
||||||
|
|
||||||
|
<div id="ExchangeContainer">
|
||||||
|
<div class="Module">
|
||||||
|
<div class="Left">
|
||||||
|
</div>
|
||||||
|
<div class="Content">
|
||||||
|
<div class="Center">
|
||||||
|
<div class="Title">
|
||||||
|
<asp:Image ID="Image1" SkinID="ExchangeList48" runat="server" />
|
||||||
|
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Edit Folder"></asp:Localize>
|
||||||
|
|
||||||
|
<asp:Literal ID="litFolderName" runat="server" Text="Folder" />
|
||||||
|
</div>
|
||||||
|
<div class="FormBody">
|
||||||
|
<wsp:CollectionTabs id="tabs" runat="server" SelectedTab="enterprisestorage_folder_settings_folder_permissions" />
|
||||||
|
<wsp:SimpleMessageBox id="messageBox" runat="server" />
|
||||||
|
|
||||||
|
<wsp:CollapsiblePanel id="colFolderPermissions" runat="server"
|
||||||
|
TargetControlID="panelFolderPermissions" meta:resourcekey="colFolderPermissions" Text="">
|
||||||
|
</wsp:CollapsiblePanel>
|
||||||
|
|
||||||
|
<asp:Panel runat="server" ID="panelFolderPermissions">
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">
|
||||||
|
<fieldset id="PermissionsPanel" runat="server">
|
||||||
|
<legend><asp:Localize ID="PermissionsSection" runat="server" meta:resourcekey="locPermissionsSection" Text="Permissions"></asp:Localize></legend>
|
||||||
|
<wsp:ESPermissions id="permissions" runat="server" />
|
||||||
|
</fieldset>
|
||||||
|
</tr>
|
||||||
|
<tr><td> </td></tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
</asp:Panel>
|
||||||
|
|
||||||
|
<div class="FormFooterClean">
|
||||||
|
<asp:Button id="btnSave" runat="server" Text="Save Changes" CssClass="Button1" meta:resourcekey="btnSave" ValidationGroup="EditFolder" OnClick="btnSave_Click"></asp:Button>
|
||||||
|
<asp:ValidationSummary ID="valSummary" runat="server" ShowMessageBox="True" ShowSummary="False" ValidationGroup="EditFolder" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -0,0 +1,86 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.UI;
|
||||||
|
using System.Web.UI.WebControls;
|
||||||
|
using WebsitePanel.Providers.HostedSolution;
|
||||||
|
using WebsitePanel.Providers.OS;
|
||||||
|
|
||||||
|
namespace WebsitePanel.Portal.ExchangeServer
|
||||||
|
{
|
||||||
|
public partial class EnterpriseStorageFolderSettingsFolderPermissions : WebsitePanelModuleBase
|
||||||
|
{
|
||||||
|
#region Constants
|
||||||
|
|
||||||
|
private const int OneGb = 1024;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (!IsPostBack)
|
||||||
|
{
|
||||||
|
if (!ES.Services.EnterpriseStorage.CheckUsersDomainExists(PanelRequest.ItemID))
|
||||||
|
{
|
||||||
|
Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "enterprisestorage_folders",
|
||||||
|
"ItemID=" + PanelRequest.ItemID));
|
||||||
|
}
|
||||||
|
|
||||||
|
BindSettings();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void BindSettings()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// get settings
|
||||||
|
Organization org = ES.Services.Organizations.GetOrganization(PanelRequest.ItemID);
|
||||||
|
|
||||||
|
SystemFile folder = ES.Services.EnterpriseStorage.GetEnterpriseFolder(
|
||||||
|
PanelRequest.ItemID, PanelRequest.FolderID);
|
||||||
|
|
||||||
|
litFolderName.Text = string.Format("{0}", folder.Name);
|
||||||
|
|
||||||
|
// bind form
|
||||||
|
var esPermissions = ES.Services.EnterpriseStorage.GetEnterpriseFolderPermissions(PanelRequest.ItemID,folder.Name);
|
||||||
|
|
||||||
|
permissions.SetPermissions(esPermissions);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
messageBox.ShowErrorMessage("ENETERPRISE_STORAGE_GET_FOLDER_SETTINGS", ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void btnSave_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (!Page.IsValid)
|
||||||
|
return;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
SystemFile folder = new SystemFile { Name = PanelRequest.FolderID };
|
||||||
|
|
||||||
|
if (!ES.Services.EnterpriseStorage.CheckEnterpriseStorageInitialization(PanelSecurity.PackageId, PanelRequest.ItemID))
|
||||||
|
{
|
||||||
|
ES.Services.EnterpriseStorage.CreateEnterpriseStorage(PanelSecurity.PackageId, PanelRequest.ItemID);
|
||||||
|
}
|
||||||
|
|
||||||
|
ES.Services.EnterpriseStorage.SetEnterpriseFolderPermissionSettings(
|
||||||
|
PanelRequest.ItemID,
|
||||||
|
folder,
|
||||||
|
permissions.GetPemissions());
|
||||||
|
|
||||||
|
|
||||||
|
Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "enterprisestorage_folders",
|
||||||
|
"ItemID=" + PanelRequest.ItemID));
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
messageBox.ShowErrorMessage("ENTERPRISE_STORAGE_UPDATE_FOLDER_SETTINGS", ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,132 @@
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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.ExchangeServer {
|
||||||
|
|
||||||
|
|
||||||
|
public partial class EnterpriseStorageFolderSettingsFolderPermissions {
|
||||||
|
|
||||||
|
/// <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>
|
||||||
|
/// 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>
|
||||||
|
/// litFolderName 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 litFolderName;
|
||||||
|
|
||||||
|
/// <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.EnterpriseStorageEditFolderTabs 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>
|
||||||
|
/// colFolderPermissions control.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Auto-generated field.
|
||||||
|
/// To modify move field declaration from designer file to code-behind file.
|
||||||
|
/// </remarks>
|
||||||
|
protected global::WebsitePanel.Portal.CollapsiblePanel colFolderPermissions;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// panelFolderPermissions 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 panelFolderPermissions;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PermissionsPanel 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.HtmlGenericControl PermissionsPanel;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PermissionsSection 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 PermissionsSection;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// permissions 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.EnterpriseStoragePermissions permissions;
|
||||||
|
|
||||||
|
/// <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>
|
||||||
|
/// valSummary 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 valSummary;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,54 @@
|
||||||
|
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="EnterpriseStorageFolderSettingsOwaEditing.ascx.cs" Inherits="WebsitePanel.Portal.ExchangeServer.EnterpriseStorageFolderSettingsOwaEditing" %>
|
||||||
|
|
||||||
|
|
||||||
|
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
|
||||||
|
<%@ Register Src="UserControls/EnterpriseStorageOwaUsersList.ascx" TagName="OwaUsers" TagPrefix="wsp"%>
|
||||||
|
<%@ Register TagPrefix="wsp" TagName="CollapsiblePanel" Src="../UserControls/CollapsiblePanel.ascx" %>
|
||||||
|
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
|
||||||
|
<%@ Register Src="UserControls/EnterpriseStorageEditFolderTabs.ascx" TagName="CollectionTabs" TagPrefix="wsp" %>
|
||||||
|
|
||||||
|
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/>
|
||||||
|
|
||||||
|
<div id="ExchangeContainer">
|
||||||
|
<div class="Module">
|
||||||
|
<div class="Left">
|
||||||
|
</div>
|
||||||
|
<div class="Content">
|
||||||
|
<div class="Center">
|
||||||
|
<div class="Title">
|
||||||
|
<asp:Image ID="Image1" SkinID="ExchangeList48" runat="server" />
|
||||||
|
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Edit Folder"></asp:Localize>
|
||||||
|
|
||||||
|
<asp:Literal ID="litFolderName" runat="server" Text="Folder" />
|
||||||
|
</div>
|
||||||
|
<div class="FormBody">
|
||||||
|
<wsp:CollectionTabs id="tabs" runat="server" SelectedTab="enterprisestorage_folder_settings_owa_editing" />
|
||||||
|
<wsp:SimpleMessageBox id="messageBox" runat="server" />
|
||||||
|
|
||||||
|
<wsp:CollapsiblePanel id="colOwaEditing" runat="server"
|
||||||
|
TargetControlID="panelFolderPermissions" meta:resourcekey="colOwaEditing" Text="">
|
||||||
|
</wsp:CollapsiblePanel>
|
||||||
|
|
||||||
|
<asp:Panel runat="server" ID="panelFolderPermissions">
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">
|
||||||
|
<fieldset id="OwaUsersPanel" runat="server">
|
||||||
|
<legend><asp:Localize ID="locOwaEditingSection" runat="server" meta:resourcekey="locOwaEditingSection" Text="Users And Groups"></asp:Localize></legend>
|
||||||
|
<wsp:OwaUsers id="owaUsers" runat="server" />
|
||||||
|
</fieldset>
|
||||||
|
</tr>
|
||||||
|
<tr><td> </td></tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
</asp:Panel>
|
||||||
|
|
||||||
|
<div class="FormFooterClean">
|
||||||
|
<asp:Button id="btnSave" runat="server" Text="Save Changes" CssClass="Button1" meta:resourcekey="btnSave" ValidationGroup="EditFolder" OnClick="btnSave_Click"></asp:Button>
|
||||||
|
<asp:ValidationSummary ID="valSummary" runat="server" ShowMessageBox="True" ShowSummary="False" ValidationGroup="EditFolder" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -0,0 +1,80 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.UI;
|
||||||
|
using System.Web.UI.WebControls;
|
||||||
|
using WebsitePanel.Providers.HostedSolution;
|
||||||
|
using WebsitePanel.Providers.OS;
|
||||||
|
|
||||||
|
namespace WebsitePanel.Portal.ExchangeServer
|
||||||
|
{
|
||||||
|
public partial class EnterpriseStorageFolderSettingsOwaEditing : WebsitePanelModuleBase
|
||||||
|
{
|
||||||
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (!IsPostBack)
|
||||||
|
{
|
||||||
|
if (!ES.Services.EnterpriseStorage.CheckUsersDomainExists(PanelRequest.ItemID))
|
||||||
|
{
|
||||||
|
Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "enterprisestorage_folders",
|
||||||
|
"ItemID=" + PanelRequest.ItemID));
|
||||||
|
}
|
||||||
|
|
||||||
|
BindSettings();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void BindSettings()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// get settings
|
||||||
|
Organization org = ES.Services.Organizations.GetOrganization(PanelRequest.ItemID);
|
||||||
|
|
||||||
|
SystemFile folder = ES.Services.EnterpriseStorage.GetEnterpriseFolder(
|
||||||
|
PanelRequest.ItemID, PanelRequest.FolderID);
|
||||||
|
|
||||||
|
litFolderName.Text = string.Format("{0}", folder.Name);
|
||||||
|
|
||||||
|
// bind form
|
||||||
|
var esPermissions = ES.Services.EnterpriseStorage.GetFolderOwaAccounts(PanelRequest.ItemID, folder);
|
||||||
|
|
||||||
|
owaUsers.SetUsers(esPermissions);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
messageBox.ShowErrorMessage("ENETERPRISE_STORAGE_GET_FOLDER_SETTINGS", ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void btnSave_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (!Page.IsValid)
|
||||||
|
return;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
SystemFile folder = new SystemFile { Name = PanelRequest.FolderID };
|
||||||
|
|
||||||
|
if (!ES.Services.EnterpriseStorage.CheckEnterpriseStorageInitialization(PanelSecurity.PackageId, PanelRequest.ItemID))
|
||||||
|
{
|
||||||
|
ES.Services.EnterpriseStorage.CreateEnterpriseStorage(PanelSecurity.PackageId, PanelRequest.ItemID);
|
||||||
|
}
|
||||||
|
|
||||||
|
ES.Services.EnterpriseStorage.SetFolderOwaAccounts(
|
||||||
|
PanelRequest.ItemID,
|
||||||
|
folder,
|
||||||
|
owaUsers.GetUsers());
|
||||||
|
|
||||||
|
|
||||||
|
Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "enterprisestorage_folders",
|
||||||
|
"ItemID=" + PanelRequest.ItemID));
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
messageBox.ShowErrorMessage("ENTERPRISE_STORAGE_UPDATE_FOLDER_SETTINGS", ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,132 @@
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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.ExchangeServer {
|
||||||
|
|
||||||
|
|
||||||
|
public partial class EnterpriseStorageFolderSettingsOwaEditing {
|
||||||
|
|
||||||
|
/// <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>
|
||||||
|
/// 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>
|
||||||
|
/// litFolderName 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 litFolderName;
|
||||||
|
|
||||||
|
/// <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.EnterpriseStorageEditFolderTabs 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>
|
||||||
|
/// colOwaEditing control.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Auto-generated field.
|
||||||
|
/// To modify move field declaration from designer file to code-behind file.
|
||||||
|
/// </remarks>
|
||||||
|
protected global::WebsitePanel.Portal.CollapsiblePanel colOwaEditing;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// panelFolderPermissions 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 panelFolderPermissions;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// OwaUsersPanel 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.HtmlGenericControl OwaUsersPanel;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// locOwaEditingSection 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 locOwaEditingSection;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// owaUsers 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.EnterpriseStorageOwaUsersList owaUsers;
|
||||||
|
|
||||||
|
/// <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>
|
||||||
|
/// valSummary 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 valSummary;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,129 @@
|
||||||
|
<?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="Tab.FolderPermissions" xml:space="preserve">
|
||||||
|
<value>Folder Permissions</value>
|
||||||
|
</data>
|
||||||
|
<data name="Tab.GeneralSettings" xml:space="preserve">
|
||||||
|
<value>General Settings</value>
|
||||||
|
</data>
|
||||||
|
<data name="Tab.OwaEditPermissions" xml:space="preserve">
|
||||||
|
<value>Office Web App Editing</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
|
@ -0,0 +1,156 @@
|
||||||
|
<?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="btnAdd.Text" xml:space="preserve">
|
||||||
|
<value>Add...</value>
|
||||||
|
</data>
|
||||||
|
<data name="btnAddSelected.Text" xml:space="preserve">
|
||||||
|
<value>Add Accounts</value>
|
||||||
|
</data>
|
||||||
|
<data name="btnCancel.Text" xml:space="preserve">
|
||||||
|
<value>Cancel</value>
|
||||||
|
</data>
|
||||||
|
<data name="btnDelete.Text" xml:space="preserve">
|
||||||
|
<value>Delete</value>
|
||||||
|
</data>
|
||||||
|
<data name="ddlSearchColumnDisplayName.Text" xml:space="preserve">
|
||||||
|
<value>Display Name</value>
|
||||||
|
</data>
|
||||||
|
<data name="ddlSearchColumnEmail.Text" xml:space="preserve">
|
||||||
|
<value>E-mail Address</value>
|
||||||
|
</data>
|
||||||
|
<data name="gvAccountsDisplayName.HeaderText" xml:space="preserve">
|
||||||
|
<value>Display Name</value>
|
||||||
|
</data>
|
||||||
|
<data name="gvAccountsEmail.HeaderText" xml:space="preserve">
|
||||||
|
<value>Email</value>
|
||||||
|
</data>
|
||||||
|
<data name="gvPopupAccounts.EmptyDataText" xml:space="preserve">
|
||||||
|
<value>No accounts found.</value>
|
||||||
|
</data>
|
||||||
|
<data name="gvUsers.EmptyDataText" xml:space="preserve">
|
||||||
|
<value>The list of users is empty. Click "Add..." button.</value>
|
||||||
|
</data>
|
||||||
|
<data name="gvUsersAccount.HeaderText" xml:space="preserve">
|
||||||
|
<value>Users</value>
|
||||||
|
</data>
|
||||||
|
<data name="headerAddAccounts.Text" xml:space="preserve">
|
||||||
|
<value>Enabled Users</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
|
@ -0,0 +1,31 @@
|
||||||
|
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="EnterpriseStorageEditFolderTabs.ascx.cs" Inherits="WebsitePanel.Portal.ExchangeServer.UserControls.EnterpriseStorageEditFolderTabs" %>
|
||||||
|
|
||||||
|
<table width="100%" cellpadding="0" cellspacing="1">
|
||||||
|
<tr>
|
||||||
|
<td class="Tabs">
|
||||||
|
<asp:DataList ID="esTabs" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow" EnableViewState="false">
|
||||||
|
<ItemStyle Wrap="False" />
|
||||||
|
<ItemTemplate >
|
||||||
|
<asp:HyperLink ID="lnkTab" runat="server" CssClass="Tab" NavigateUrl='<%# Eval("Url") %>' OnClick="return tabClicked();">
|
||||||
|
<%# Eval("Name") %>
|
||||||
|
</asp:HyperLink>
|
||||||
|
</ItemTemplate>
|
||||||
|
<SelectedItemStyle Wrap="False" />
|
||||||
|
<SelectedItemTemplate>
|
||||||
|
<asp:HyperLink ID="lnkSelTab" runat="server" CssClass="ActiveTab" NavigateUrl='<%# Eval("Url") %>' OnClick="return tabClicked;">
|
||||||
|
<%# Eval("Name") %>
|
||||||
|
</asp:HyperLink>
|
||||||
|
</SelectedItemTemplate>
|
||||||
|
</asp:DataList>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br />
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
function tabClicked() {
|
||||||
|
ShowProgressDialog('Loading');
|
||||||
|
ShowProgressDialogInternal();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
</script>
|
|
@ -0,0 +1,52 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.UI;
|
||||||
|
using System.Web.UI.WebControls;
|
||||||
|
using WebsitePanel.Portal.Code.UserControls;
|
||||||
|
|
||||||
|
namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
||||||
|
{
|
||||||
|
public partial class EnterpriseStorageEditFolderTabs : WebsitePanelControlBase
|
||||||
|
{
|
||||||
|
public string SelectedTab { get; set; }
|
||||||
|
|
||||||
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
BindTabs();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void BindTabs()
|
||||||
|
{
|
||||||
|
List<Tab> tabsList = new List<Tab>();
|
||||||
|
tabsList.Add(CreateTab("enterprisestorage_folder_settings", "Tab.GeneralSettings"));
|
||||||
|
tabsList.Add(CreateTab("enterprisestorage_folder_settings_folder_permissions", "Tab.FolderPermissions"));
|
||||||
|
tabsList.Add(CreateTab("enterprisestorage_folder_settings_owa_editing", "Tab.OwaEditPermissions"));
|
||||||
|
|
||||||
|
int idx = 0;
|
||||||
|
|
||||||
|
foreach (Tab tab in tabsList)
|
||||||
|
{
|
||||||
|
if (String.Compare(tab.Id, SelectedTab, true) == 0)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
idx++;
|
||||||
|
}
|
||||||
|
|
||||||
|
esTabs.SelectedIndex = idx;
|
||||||
|
esTabs.DataSource = tabsList;
|
||||||
|
esTabs.DataBind();
|
||||||
|
}
|
||||||
|
|
||||||
|
private Tab CreateTab(string id, string text)
|
||||||
|
{
|
||||||
|
return new Tab(id,GetLocalizedString(text),
|
||||||
|
HostModule.EditUrl("AccountID", PanelRequest.AccountID.ToString(), id,
|
||||||
|
"SpaceID=" + PanelSecurity.PackageId.ToString(),
|
||||||
|
"ItemID=" + PanelRequest.ItemID.ToString(), "FolderID=" + PanelRequest.FolderID));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,24 @@
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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.ExchangeServer.UserControls {
|
||||||
|
|
||||||
|
|
||||||
|
public partial class EnterpriseStorageEditFolderTabs {
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// esTabs 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.DataList esTabs;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,114 @@
|
||||||
|
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="EnterpriseStorageOwaUsersList.ascx.cs" Inherits="WebsitePanel.Portal.ExchangeServer.UserControls.EnterpriseStorageOwaUsersList" %>
|
||||||
|
|
||||||
|
<asp:UpdatePanel ID="UsersUpdatePanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="FormButtonsBarClean">
|
||||||
|
<asp:Button ID="btnAdd" runat="server" Text="Add..." CssClass="Button1" OnClick="btnAdd_Click" meta:resourcekey="btnAdd" />
|
||||||
|
<asp:Button ID="btnDelete" runat="server" Text="Delete" CssClass="Button1" OnClick="btnDelete_Click" meta:resourcekey="btnDelete"/>
|
||||||
|
</div>
|
||||||
|
<asp:GridView ID="gvUsers" runat="server" meta:resourcekey="gvUsers" AutoGenerateColumns="False"
|
||||||
|
Width="600px" CssSelectorClass="NormalGridView"
|
||||||
|
DataKeyNames="AccountName">
|
||||||
|
<Columns>
|
||||||
|
<asp:TemplateField>
|
||||||
|
<HeaderTemplate>
|
||||||
|
<asp:CheckBox ID="chkSelectAll" runat="server" onclick="javascript:SelectAllCheckboxes(this);" />
|
||||||
|
</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:CheckBox ID="chkSelect" runat="server" />
|
||||||
|
</ItemTemplate>
|
||||||
|
<ItemStyle Width="10px" />
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField meta:resourcekey="gvUsersAccount" HeaderText="gvUsersAccount">
|
||||||
|
<ItemStyle Width="96%" Wrap="false" HorizontalAlign="Left">
|
||||||
|
</ItemStyle>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="litAccount" runat="server" Text='<%# Eval("DisplayName") %>'></asp:Literal>
|
||||||
|
<asp:HiddenField ID="hdnAccountId" runat="server" Value='<%# Eval("AccountId") %>' />
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
</Columns>
|
||||||
|
</asp:GridView>
|
||||||
|
<br />
|
||||||
|
|
||||||
|
|
||||||
|
<asp:Panel ID="AddAccountsPanel" runat="server" CssClass="Popup" style="display:none">
|
||||||
|
<table class="Popup-Header" cellpadding="0" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td class="Popup-HeaderLeft"></td>
|
||||||
|
<td class="Popup-HeaderTitle">
|
||||||
|
<asp:Localize ID="headerAddAccounts" runat="server" meta:resourcekey="headerAddAccounts"></asp:Localize>
|
||||||
|
</td>
|
||||||
|
<td class="Popup-HeaderRight"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<div class="Popup-Content">
|
||||||
|
<div class="Popup-Body">
|
||||||
|
<br />
|
||||||
|
<asp:UpdatePanel ID="AddAccountsUpdatePanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
|
||||||
|
<ContentTemplate>
|
||||||
|
|
||||||
|
<div class="FormButtonsBarClean">
|
||||||
|
<div class="FormButtonsBarCleanRight">
|
||||||
|
<asp:Panel ID="SearchPanel" runat="server" DefaultButton="cmdSearch">
|
||||||
|
<asp:DropDownList ID="ddlSearchColumn" runat="server" CssClass="NormalTextBox">
|
||||||
|
<asp:ListItem Value="DisplayName" meta:resourcekey="ddlSearchColumnDisplayName">DisplayName</asp:ListItem>
|
||||||
|
<asp:ListItem Value="PrimaryEmailAddress" meta:resourcekey="ddlSearchColumnEmail">Email</asp:ListItem>
|
||||||
|
</asp:DropDownList><asp:TextBox ID="txtSearchValue" runat="server" CssClass="NormalTextBox" Width="100"></asp:TextBox><asp:ImageButton ID="cmdSearch" Runat="server" meta:resourcekey="cmdSearch" SkinID="SearchButton"
|
||||||
|
CausesValidation="false" OnClick="cmdSearch_Click"/>
|
||||||
|
</asp:Panel>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="Popup-Scroll">
|
||||||
|
<asp:GridView ID="gvPopupAccounts" runat="server" meta:resourcekey="gvPopupAccounts" AutoGenerateColumns="False"
|
||||||
|
Width="100%" CssSelectorClass="NormalGridView"
|
||||||
|
DataKeyNames="AccountName">
|
||||||
|
<Columns>
|
||||||
|
<asp:TemplateField>
|
||||||
|
<HeaderTemplate>
|
||||||
|
<asp:CheckBox ID="chkSelectAll" runat="server" onclick="javascript:SelectAllCheckboxes(this);" />
|
||||||
|
</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:CheckBox ID="chkSelect" runat="server" />
|
||||||
|
<asp:Literal ID="litAccountType" runat="server" Visible="false" Text='<%# Eval("AccountType") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
<ItemStyle Width="10px" />
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField meta:resourcekey="gvAccountsDisplayName">
|
||||||
|
<ItemStyle Width="50%" HorizontalAlign="Left"></ItemStyle>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Image ID="imgAccount" runat="server" ImageUrl='<%# GetAccountImage((int)Eval("AccountType")) %>' ImageAlign="AbsMiddle" />
|
||||||
|
<asp:Literal ID="litDisplayName" runat="server" Text='<%# Eval("DisplayName") %>'></asp:Literal>
|
||||||
|
<asp:HiddenField ID="hdnAccountId" runat="server" Value='<%# Eval("AccountId") %>' />
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField meta:resourcekey="gvAccountsEmail">
|
||||||
|
<ItemStyle Width="50%" HorizontalAlign="Left"></ItemStyle>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="litPrimaryEmailAddress" runat="server" Text='<%# Eval("PrimaryEmailAddress") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
</Columns>
|
||||||
|
</asp:GridView>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
<br />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="FormFooter">
|
||||||
|
<asp:Button ID="btnAddSelected" runat="server" CssClass="Button1" meta:resourcekey="btnAddSelected" Text="Add Accounts" OnClick="btnAddSelected_Click" />
|
||||||
|
<asp:Button ID="btnCancelAdd" runat="server" CssClass="Button1" meta:resourcekey="btnCancel" Text="Cancel" CausesValidation="false" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</asp:Panel>
|
||||||
|
|
||||||
|
<asp:Button ID="btnAddAccountsFake" runat="server" style="display:none;" />
|
||||||
|
<ajaxToolkit:ModalPopupExtender ID="AddAccountsModal" runat="server"
|
||||||
|
TargetControlID="btnAddAccountsFake" PopupControlID="AddAccountsPanel"
|
||||||
|
BackgroundCssClass="modalBackground" DropShadow="false" CancelControlID="btnCancelAdd" />
|
||||||
|
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,215 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.UI;
|
||||||
|
using System.Web.UI.WebControls;
|
||||||
|
using WebsitePanel.Providers.HostedSolution;
|
||||||
|
|
||||||
|
namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
||||||
|
{
|
||||||
|
public partial class EnterpriseStorageOwaUsersList : WebsitePanelControlBase
|
||||||
|
{
|
||||||
|
public const string DirectionString = "DirectionString";
|
||||||
|
|
||||||
|
protected enum SelectedState
|
||||||
|
{
|
||||||
|
All,
|
||||||
|
Selected,
|
||||||
|
Unselected
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetUsers(OrganizationUser[] users)
|
||||||
|
{
|
||||||
|
BindAccounts(users, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public OrganizationUser[] GetUsers()
|
||||||
|
{
|
||||||
|
return GetGridViewUsers(EnterpriseStorageOwaUsersList.SelectedState.All).ToArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
// register javascript
|
||||||
|
if (!Page.ClientScript.IsClientScriptBlockRegistered("SelectAllCheckboxes"))
|
||||||
|
{
|
||||||
|
string script = @" function SelectAllCheckboxes(box)
|
||||||
|
{
|
||||||
|
var state = box.checked;
|
||||||
|
var elm = box.parentElement.parentElement.parentElement.parentElement.getElementsByTagName(""INPUT"");
|
||||||
|
for(i = 0; i < elm.length; i++)
|
||||||
|
if(elm[i].type == ""checkbox"" && elm[i].id != box.id && elm[i].checked != state && !elm[i].disabled)
|
||||||
|
elm[i].checked = state;
|
||||||
|
}";
|
||||||
|
Page.ClientScript.RegisterClientScriptBlock(typeof(EnterpriseStorageOwaUsersList), "SelectAllCheckboxes",
|
||||||
|
script, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void btnAdd_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
// bind all accounts
|
||||||
|
BindPopupAccounts();
|
||||||
|
|
||||||
|
// show modal
|
||||||
|
AddAccountsModal.Show();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void btnDelete_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
List<OrganizationUser> selectedAccounts = GetGridViewUsers(EnterpriseStorageOwaUsersList.SelectedState.Unselected);
|
||||||
|
|
||||||
|
BindAccounts(selectedAccounts.ToArray(), false);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void btnAddSelected_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
List<OrganizationUser> selectedAccounts = GetGridViewAccounts();
|
||||||
|
|
||||||
|
BindAccounts(selectedAccounts.ToArray(), true);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public string GetAccountImage(int accountTypeId)
|
||||||
|
{
|
||||||
|
string imgName = string.Empty;
|
||||||
|
|
||||||
|
ExchangeAccountType accountType = (ExchangeAccountType)accountTypeId;
|
||||||
|
switch (accountType)
|
||||||
|
{
|
||||||
|
case ExchangeAccountType.Room:
|
||||||
|
imgName = "room_16.gif";
|
||||||
|
break;
|
||||||
|
case ExchangeAccountType.Equipment:
|
||||||
|
imgName = "equipment_16.gif";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
imgName = "admin_16.png";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return GetThemedImage("Exchange/" + imgName);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void BindPopupAccounts()
|
||||||
|
{
|
||||||
|
ExchangeAccount[] accounts = ES.Services.EnterpriseStorage.SearchESAccounts(PanelRequest.ItemID,
|
||||||
|
ddlSearchColumn.SelectedValue, txtSearchValue.Text + "%", "");
|
||||||
|
|
||||||
|
accounts = accounts.Where(x => !GetUsers().Select(p => p.AccountName).Contains(x.AccountName)).ToArray();
|
||||||
|
|
||||||
|
Array.Sort(accounts, CompareAccount);
|
||||||
|
|
||||||
|
if (Direction == SortDirection.Ascending)
|
||||||
|
{
|
||||||
|
Array.Reverse(accounts);
|
||||||
|
Direction = SortDirection.Descending;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
Direction = SortDirection.Ascending;
|
||||||
|
|
||||||
|
gvPopupAccounts.DataSource = accounts;
|
||||||
|
gvPopupAccounts.DataBind();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void BindAccounts(OrganizationUser[] newUsers, bool preserveExisting)
|
||||||
|
{
|
||||||
|
// get binded addresses
|
||||||
|
List<OrganizationUser> users = new List<OrganizationUser>();
|
||||||
|
if (preserveExisting)
|
||||||
|
users.AddRange(GetGridViewUsers(EnterpriseStorageOwaUsersList.SelectedState.All));
|
||||||
|
|
||||||
|
// add new accounts
|
||||||
|
if (newUsers != null)
|
||||||
|
{
|
||||||
|
foreach (OrganizationUser newUser in newUsers)
|
||||||
|
{
|
||||||
|
// check if exists
|
||||||
|
bool exists = false;
|
||||||
|
foreach (OrganizationUser user in users)
|
||||||
|
{
|
||||||
|
if (String.Compare(user.AccountName, newUser.AccountName, true) == 0)
|
||||||
|
{
|
||||||
|
exists = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (exists)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
users.Add(newUser);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
gvUsers.DataSource = users;
|
||||||
|
gvUsers.DataBind();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected List<OrganizationUser> GetGridViewUsers(EnterpriseStorageOwaUsersList.SelectedState state)
|
||||||
|
{
|
||||||
|
List<OrganizationUser> users = new List<OrganizationUser>();
|
||||||
|
for (int i = 0; i < gvUsers.Rows.Count; i++)
|
||||||
|
{
|
||||||
|
GridViewRow row = gvUsers.Rows[i];
|
||||||
|
CheckBox chkSelect = (CheckBox)row.FindControl("chkSelect");
|
||||||
|
if (chkSelect == null)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
OrganizationUser user = new OrganizationUser();
|
||||||
|
user.AccountName = (string)gvUsers.DataKeys[i][0];
|
||||||
|
user.DisplayName = ((Literal)row.FindControl("litAccount")).Text;
|
||||||
|
user.AccountId = Convert.ToInt32(((HiddenField)row.FindControl("hdnAccountId")).Value);
|
||||||
|
|
||||||
|
if (state == EnterpriseStorageOwaUsersList.SelectedState.All ||
|
||||||
|
(state == EnterpriseStorageOwaUsersList.SelectedState.Selected && chkSelect.Checked) ||
|
||||||
|
(state == EnterpriseStorageOwaUsersList.SelectedState.Unselected && !chkSelect.Checked))
|
||||||
|
users.Add(user);
|
||||||
|
}
|
||||||
|
|
||||||
|
return users;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected List<OrganizationUser> GetGridViewAccounts()
|
||||||
|
{
|
||||||
|
List<OrganizationUser> accounts = new List<OrganizationUser>();
|
||||||
|
for (int i = 0; i < gvPopupAccounts.Rows.Count; i++)
|
||||||
|
{
|
||||||
|
GridViewRow row = gvPopupAccounts.Rows[i];
|
||||||
|
CheckBox chkSelect = (CheckBox)row.FindControl("chkSelect");
|
||||||
|
if (chkSelect == null)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (chkSelect.Checked)
|
||||||
|
{
|
||||||
|
accounts.Add(new OrganizationUser
|
||||||
|
{
|
||||||
|
AccountName = (string)gvPopupAccounts.DataKeys[i][0],
|
||||||
|
DisplayName = ((Literal)row.FindControl("litDisplayName")).Text,
|
||||||
|
AccountId = Convert.ToInt32(((HiddenField)row.FindControl("hdnAccountId")).Value)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return accounts;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void cmdSearch_Click(object sender, ImageClickEventArgs e)
|
||||||
|
{
|
||||||
|
BindPopupAccounts();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected SortDirection Direction
|
||||||
|
{
|
||||||
|
get { return ViewState[DirectionString] == null ? SortDirection.Descending : (SortDirection)ViewState[DirectionString]; }
|
||||||
|
set { ViewState[DirectionString] = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
protected static int CompareAccount(ExchangeAccount user1, ExchangeAccount user2)
|
||||||
|
{
|
||||||
|
return string.Compare(user1.DisplayName, user2.DisplayName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,159 @@
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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.ExchangeServer.UserControls {
|
||||||
|
|
||||||
|
|
||||||
|
public partial class EnterpriseStorageOwaUsersList {
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// UsersUpdatePanel 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 UsersUpdatePanel;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnAdd 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 btnAdd;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnDelete 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 btnDelete;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// gvUsers 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.GridView gvUsers;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// AddAccountsPanel 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 AddAccountsPanel;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// headerAddAccounts 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 headerAddAccounts;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// AddAccountsUpdatePanel 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 AddAccountsUpdatePanel;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// SearchPanel 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 SearchPanel;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ddlSearchColumn 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.DropDownList ddlSearchColumn;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtSearchValue 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.TextBox txtSearchValue;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// cmdSearch 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.ImageButton cmdSearch;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// gvPopupAccounts 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.GridView gvPopupAccounts;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnAddSelected 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 btnAddSelected;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnCancelAdd 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 btnCancelAdd;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnAddAccountsFake 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 btnAddAccountsFake;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// AddAccountsModal control.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Auto-generated field.
|
||||||
|
/// To modify move field declaration from designer file to code-behind file.
|
||||||
|
/// </remarks>
|
||||||
|
protected global::AjaxControlToolkit.ModalPopupExtender AddAccountsModal;
|
||||||
|
}
|
||||||
|
}
|
|
@ -126,4 +126,22 @@
|
||||||
<data name="ServerNameColumn.HeaderText" xml:space="preserve">
|
<data name="ServerNameColumn.HeaderText" xml:space="preserve">
|
||||||
<value>Server Name</value>
|
<value>Server Name</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="lblPFXInstallPassword.Text" xml:space="preserve">
|
||||||
|
<value>Certificate Password:</value>
|
||||||
|
</data>
|
||||||
|
<data name="secCertificateSettings.Text" xml:space="preserve">
|
||||||
|
<value>SSL Certificate</value>
|
||||||
|
</data>
|
||||||
|
<data name="lblSelectFile.Text" xml:space="preserve">
|
||||||
|
<value>Select Certificate:</value>
|
||||||
|
</data>
|
||||||
|
<data name="lblExpiryDate.Text" xml:space="preserve">
|
||||||
|
<value>Expiry Date:</value>
|
||||||
|
</data>
|
||||||
|
<data name="lblIssuedBy.Text" xml:space="preserve">
|
||||||
|
<value>Issued By:</value>
|
||||||
|
</data>
|
||||||
|
<data name="lblSanName.Text" xml:space="preserve">
|
||||||
|
<value>SAN Name:</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
|
@ -1,5 +1,63 @@
|
||||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="RDS_Settings.ascx.cs" Inherits="WebsitePanel.Portal.ProviderControls.RDS_Settings" %>
|
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="RDS_Settings.ascx.cs" Inherits="WebsitePanel.Portal.ProviderControls.RDS_Settings" %>
|
||||||
<table>
|
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
|
||||||
|
|
||||||
|
<fieldset>
|
||||||
|
<legend>
|
||||||
|
<asp:Label ID="secCertificateSettings" runat="server" meta:resourcekey="secServiceSettings" Text="SSL Certificate" CssClass="NormalBold"></asp:Label>
|
||||||
|
</legend>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td class="SubHead" style="width:200px" nowrap>
|
||||||
|
<asp:Localize runat="server" meta:resourcekey="lblSelectFile" />
|
||||||
|
</td>
|
||||||
|
<td style="padding: 10px 0 10px 0;"><asp:FileUpload ID="upPFX" runat="server"/></td>
|
||||||
|
</tr>
|
||||||
|
<tr><td></td></tr>
|
||||||
|
<tr>
|
||||||
|
<td class="SubHead" style="width:200px" nowrap>
|
||||||
|
<asp:Localize runat="server" meta:resourcekey="lblPFXInstallPassword" />
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<asp:TextBox ID="txtPFXInstallPassword" runat="server" TextMode="Password" Width="200px" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</fieldset>
|
||||||
|
<fieldset>
|
||||||
|
<legend>
|
||||||
|
<asp:Label ID="currentCertificate" runat="server" meta:resourcekey="currentCertificate" Text="Current Certificate" CssClass="NormalBold"></asp:Label>
|
||||||
|
</legend>
|
||||||
|
<asp:Panel ID="plCertificateInfo" Visible="false" runat="server">
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td class="SubHead" style="width:200px" nowrap>
|
||||||
|
<asp:Localize runat="server" meta:resourcekey="lblIssuedBy" />
|
||||||
|
</td>
|
||||||
|
<td class="SubHead">
|
||||||
|
<asp:Label ID="lblIssuedBy" runat="server"/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="SubHead" style="width:200px" nowrap>
|
||||||
|
<asp:Localize runat="server" meta:resourcekey="lblSanName" />
|
||||||
|
</td>
|
||||||
|
<td class="SubHead">
|
||||||
|
<asp:Label ID="lblSanName" runat="server"/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="SubHead" style="width:200px" nowrap>
|
||||||
|
<asp:Localize runat="server" meta:resourcekey="lblExpiryDate" />
|
||||||
|
</td>
|
||||||
|
<td class="SubHead">
|
||||||
|
<asp:Label ID="lblExpiryDate" runat="server"/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</asp:Panel>
|
||||||
|
</fieldset>
|
||||||
|
<fieldset>
|
||||||
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="SubHead" width="200" nowrap>
|
<td class="SubHead" width="200" nowrap>
|
||||||
<asp:Label runat="server" ID="lblConnectionBroker" meta:resourcekey="lblConnectionBroker" Text="Connection Broker:"/>
|
<asp:Label runat="server" ID="lblConnectionBroker" meta:resourcekey="lblConnectionBroker" Text="Connection Broker:"/>
|
||||||
|
@ -72,4 +130,6 @@
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
</fieldset>
|
||||||
|
<br />
|
|
@ -26,11 +26,14 @@
|
||||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
using AjaxControlToolkit;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Security.Cryptography.X509Certificates;
|
||||||
using System.Web.UI.WebControls;
|
using System.Web.UI.WebControls;
|
||||||
using WebsitePanel.EnterpriseServer;
|
using WebsitePanel.EnterpriseServer;
|
||||||
using WebsitePanel.Providers.Common;
|
using WebsitePanel.Providers.Common;
|
||||||
|
using WebsitePanel.Providers.RemoteDesktopServices;
|
||||||
|
|
||||||
namespace WebsitePanel.Portal.ProviderControls
|
namespace WebsitePanel.Portal.ProviderControls
|
||||||
{
|
{
|
||||||
|
@ -38,7 +41,7 @@ namespace WebsitePanel.Portal.ProviderControls
|
||||||
{
|
{
|
||||||
protected void Page_Load(object sender, EventArgs e)
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
FillCertificateInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GWServers
|
public string GWServers
|
||||||
|
@ -53,12 +56,30 @@ namespace WebsitePanel.Portal.ProviderControls
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void BindSettings(System.Collections.Specialized.StringDictionary settings)
|
private void FillCertificateInfo()
|
||||||
{
|
{
|
||||||
|
var certificate = ES.Services.RDS.GetRdsCertificateByServiceId(PanelRequest.ServiceId);
|
||||||
|
|
||||||
|
if (certificate != null)
|
||||||
|
{
|
||||||
|
var array = Convert.FromBase64String(certificate.Hash);
|
||||||
|
char[] chars = new char[array.Length / sizeof(char)];
|
||||||
|
System.Buffer.BlockCopy(array, 0, chars, 0, array.Length);
|
||||||
|
string password = new string(chars);
|
||||||
|
plCertificateInfo.Visible = true;
|
||||||
|
byte[] content = Convert.FromBase64String(certificate.Content);
|
||||||
|
var x509 = new X509Certificate2(content, password);
|
||||||
|
lblIssuedBy.Text = x509.Issuer.Replace("CN=", "").Replace("OU=", "").Replace("O=", "").Replace("L=", "").Replace("S=", "").Replace("C=", "");
|
||||||
|
lblExpiryDate.Text = x509.NotAfter.ToLongDateString();
|
||||||
|
lblSanName.Text = x509.SubjectName.Name.Replace("CN=", "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void BindSettings(System.Collections.Specialized.StringDictionary settings)
|
||||||
|
{
|
||||||
txtConnectionBroker.Text = settings["ConnectionBroker"];
|
txtConnectionBroker.Text = settings["ConnectionBroker"];
|
||||||
|
|
||||||
GWServers = settings["GWServrsList"];
|
GWServers = settings["GWServrsList"];
|
||||||
|
|
||||||
UpdateLyncServersGrid();
|
UpdateLyncServersGrid();
|
||||||
|
|
||||||
txtRootOU.Text = settings["RootOU"];
|
txtRootOU.Text = settings["RootOU"];
|
||||||
|
@ -86,7 +107,26 @@ namespace WebsitePanel.Portal.ProviderControls
|
||||||
settings["UseCentralNPS"] = chkUseCentralNPS.Checked.ToString();
|
settings["UseCentralNPS"] = chkUseCentralNPS.Checked.ToString();
|
||||||
settings["CentralNPS"] = chkUseCentralNPS.Checked ? txtCentralNPS.Text : string.Empty;
|
settings["CentralNPS"] = chkUseCentralNPS.Checked ? txtCentralNPS.Text : string.Empty;
|
||||||
|
|
||||||
settings["GWServrsList"] = GWServers;
|
settings["GWServrsList"] = GWServers;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (upPFX.HasFile.Equals(true))
|
||||||
|
{
|
||||||
|
var certificate = new RdsCertificate
|
||||||
|
{
|
||||||
|
ServiceId = PanelRequest.ServiceId,
|
||||||
|
Content = Convert.ToBase64String(upPFX.FileBytes),
|
||||||
|
FileName = upPFX.FileName,
|
||||||
|
Hash = txtPFXInstallPassword.Text
|
||||||
|
};
|
||||||
|
|
||||||
|
ES.Services.RDS.AddRdsCertificate(certificate);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void chkUseCentralNPS_CheckedChanged(object sender, EventArgs e)
|
protected void chkUseCentralNPS_CheckedChanged(object sender, EventArgs e)
|
||||||
|
@ -144,7 +184,7 @@ namespace WebsitePanel.Portal.ProviderControls
|
||||||
GWServers = str.TrimEnd(';');
|
GWServers = str.TrimEnd(';');
|
||||||
UpdateLyncServersGrid();
|
UpdateLyncServersGrid();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class GWServer
|
public class GWServer
|
||||||
|
|
|
@ -1,31 +1,3 @@
|
||||||
// Copyright (c) 2015, 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.
|
||||||
|
@ -40,6 +12,78 @@ namespace WebsitePanel.Portal.ProviderControls {
|
||||||
|
|
||||||
public partial class RDS_Settings {
|
public partial class RDS_Settings {
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// secCertificateSettings 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 secCertificateSettings;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// upPFX 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.FileUpload upPFX;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtPFXInstallPassword 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.TextBox txtPFXInstallPassword;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// currentCertificate 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 currentCertificate;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// plCertificateInfo 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 plCertificateInfo;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// lblIssuedBy 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 lblIssuedBy;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// lblSanName 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 lblSanName;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// lblExpiryDate 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 lblExpiryDate;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// lblConnectionBroker control.
|
/// lblConnectionBroker control.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -153,4 +153,10 @@
|
||||||
<data name="locLblApplicationName" xml:space="preserve">
|
<data name="locLblApplicationName" xml:space="preserve">
|
||||||
<value>Application Name</value>
|
<value>Application Name</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="btnExit.Text" xml:space="preserve">
|
||||||
|
<value>Back to Applications List</value>
|
||||||
|
</data>
|
||||||
|
<data name="btnSaveExit.Text" xml:space="preserve">
|
||||||
|
<value>Save Changes and Exit</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
|
@ -28,27 +28,7 @@
|
||||||
<asp:RequiredFieldValidator ID="valCollectionName" runat="server" ErrorMessage="*" ControlToValidate="txtCollectionName" ValidationGroup="SaveRDSCollection"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="valCollectionName" runat="server" ErrorMessage="*" ControlToValidate="txtCollectionName" ValidationGroup="SaveRDSCollection"></asp:RequiredFieldValidator>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<wsp:CollapsiblePanel id="secSelectSertificate" runat="server"
|
|
||||||
TargetControlID="panelSelectSertificate" meta:resourcekey="secSelectSertificate" Text="">
|
|
||||||
</wsp:CollapsiblePanel>
|
|
||||||
|
|
||||||
<asp:Panel runat="server" ID="panelSelectSertificate">
|
|
||||||
<div style="padding: 10px;">
|
|
||||||
<div class="FormBody">
|
|
||||||
<div class="FormField">
|
|
||||||
<asp:FileUpload ID="upPFX" runat="server"/>
|
|
||||||
</div>
|
|
||||||
<div class="FormFieldDescription">
|
|
||||||
<asp:Localize runat="server" meta:resourcekey="lblPFXInstallPassword" />
|
|
||||||
</div>
|
|
||||||
<div class="FormField">
|
|
||||||
<asp:TextBox ID="txtPFXInstallPassword" runat="server" TextMode="Password" CssClass="NormalTextBox" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</asp:Panel>
|
|
||||||
|
|
||||||
<fieldset id="RDSServersPanel" runat="server">
|
<fieldset id="RDSServersPanel" runat="server">
|
||||||
<legend><asp:Localize ID="locRDSServersSection" runat="server" meta:resourcekey="locRDSServersSection" Text="RDS Servers"></asp:Localize></legend>
|
<legend><asp:Localize ID="locRDSServersSection" runat="server" meta:resourcekey="locRDSServersSection" Text="RDS Servers"></asp:Localize></legend>
|
||||||
|
|
|
@ -63,27 +63,13 @@ namespace WebsitePanel.Portal.RDS
|
||||||
}
|
}
|
||||||
|
|
||||||
RdsCollection collection = new RdsCollection{ Name = txtCollectionName.Text, DisplayName = txtCollectionName.Text, Servers = servers.GetServers(), Description = "" };
|
RdsCollection collection = new RdsCollection{ Name = txtCollectionName.Text, DisplayName = txtCollectionName.Text, Servers = servers.GetServers(), Description = "" };
|
||||||
int collectionId = ES.Services.RDS.AddRdsCollection(PanelRequest.ItemID, collection);
|
int collectionId = ES.Services.RDS.AddRdsCollection(PanelRequest.ItemID, collection);
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
if (upPFX.HasFile.Equals(true))
|
|
||||||
{
|
|
||||||
byte[] pfx = upPFX.FileBytes;
|
|
||||||
string certPassword = txtPFXInstallPassword.Text;
|
|
||||||
//ES.Services.RDS.InstallSessionHostsCertificate(collectionId, pfx, certPassword);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch(Exception ex)
|
|
||||||
{
|
|
||||||
messageBox.ShowErrorMessage("RDSSESSIONHOST_CERTIFICATE_NOT_INSTALLED", ex);
|
|
||||||
}
|
|
||||||
|
|
||||||
Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "rds_edit_collection", "CollectionId=" + collectionId, "ItemID=" + PanelRequest.ItemID));
|
Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "rds_edit_collection", "CollectionId=" + collectionId, "ItemID=" + PanelRequest.ItemID));
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
messageBox.ShowErrorMessage("RDSCOLLECTION_NOT_CREATED", ex);
|
ShowErrorMessage("RDSCOLLECTION_NOT_CREATED", ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,42 +75,6 @@ namespace WebsitePanel.Portal.RDS {
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::System.Web.UI.WebControls.RequiredFieldValidator valCollectionName;
|
protected global::System.Web.UI.WebControls.RequiredFieldValidator valCollectionName;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// secSelectSertificate control.
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// Auto-generated field.
|
|
||||||
/// To modify move field declaration from designer file to code-behind file.
|
|
||||||
/// </remarks>
|
|
||||||
protected global::WebsitePanel.Portal.CollapsiblePanel secSelectSertificate;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// panelSelectSertificate 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 panelSelectSertificate;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// upPFX 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.FileUpload upPFX;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// txtPFXInstallPassword 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.TextBox txtPFXInstallPassword;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// RDSServersPanel control.
|
/// RDSServersPanel control.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -55,8 +55,12 @@
|
||||||
</div>
|
</div>
|
||||||
</asp:Panel>
|
</asp:Panel>
|
||||||
<div class="FormFooterClean">
|
<div class="FormFooterClean">
|
||||||
<wsp:ItemButtonPanel id="buttonPanel" runat="server" ValidationGroup="SaveRDSCollection"
|
<asp:Button id="btnSave" runat="server" Text="Save Changes" CssClass="Button1" meta:resourcekey="btnSave"
|
||||||
OnSaveClick="btnSave_Click" OnSaveExitClick="btnSaveExit_Click" />
|
OnClick="btnSave_Click" OnClientClick="ShowProgressDialog('Updating ...');"></asp:Button>
|
||||||
|
<asp:Button id="btnSaveExit" runat="server" Text="Save Changes and Exit" CssClass="Button1" meta:resourcekey="btnSaveExit"
|
||||||
|
OnClick="btnSaveExit_Click" OnClientClick="ShowProgressDialog('Updating ...');"></asp:Button>
|
||||||
|
<asp:Button id="btnExit" runat="server" Text="Back to Applications List" CssClass="Button1" meta:resourcekey="btnExit"
|
||||||
|
OnClick="btnExit_Click" OnClientClick="ShowProgressDialog('Loading ...');"></asp:Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -52,6 +52,19 @@ namespace WebsitePanel.Portal.RDS
|
||||||
txtApplicationName.Text = remoteApp.DisplayName;
|
txtApplicationName.Text = remoteApp.DisplayName;
|
||||||
//var remoteAppUsers = organizationUsers.Where(x => applicationUsers.Contains(x.AccountName));
|
//var remoteAppUsers = organizationUsers.Where(x => applicationUsers.Contains(x.AccountName));
|
||||||
var remoteAppUsers = organizationUsers.Where(x => applicationUsers.Select(a => a.Split('\\').Last().ToLower()).Contains(x.SamAccountName.Split('\\').Last().ToLower()));
|
var remoteAppUsers = organizationUsers.Where(x => applicationUsers.Select(a => a.Split('\\').Last().ToLower()).Contains(x.SamAccountName.Split('\\').Last().ToLower()));
|
||||||
|
var localAdmins = ES.Services.RDS.GetRdsCollectionLocalAdmins(PanelRequest.CollectionID);
|
||||||
|
|
||||||
|
foreach(var user in remoteAppUsers)
|
||||||
|
{
|
||||||
|
if (localAdmins.Select(l => l.AccountName).Contains(user.AccountName))
|
||||||
|
{
|
||||||
|
user.IsVIP = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
user.IsVIP = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
users.SetUsers(remoteAppUsers.ToArray());
|
users.SetUsers(remoteAppUsers.ToArray());
|
||||||
}
|
}
|
||||||
|
@ -100,5 +113,10 @@ namespace WebsitePanel.Portal.RDS
|
||||||
Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "rds_collection_edit_apps", "CollectionId=" + PanelRequest.CollectionID, "ItemID=" + PanelRequest.ItemID));
|
Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "rds_collection_edit_apps", "CollectionId=" + PanelRequest.CollectionID, "ItemID=" + PanelRequest.ItemID));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void btnExit_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "rds_collection_edit_apps", "CollectionId=" + PanelRequest.CollectionID, "ItemID=" + PanelRequest.ItemID));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -139,12 +139,30 @@ namespace WebsitePanel.Portal.RDS {
|
||||||
protected global::WebsitePanel.Portal.RDS.UserControls.RDSCollectionUsers users;
|
protected global::WebsitePanel.Portal.RDS.UserControls.RDSCollectionUsers users;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// buttonPanel control.
|
/// btnSave 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.ItemButtonPanel buttonPanel;
|
protected global::System.Web.UI.WebControls.Button btnSave;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnSaveExit 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 btnSaveExit;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnExit 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 btnExit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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.Web.UI.WebControls;
|
using System.Web.UI.WebControls;
|
||||||
using WebsitePanel.EnterpriseServer;
|
using WebsitePanel.EnterpriseServer;
|
||||||
using WebsitePanel.Providers.Common;
|
using WebsitePanel.Providers.Common;
|
||||||
|
@ -45,6 +46,19 @@ namespace WebsitePanel.Portal.RDS
|
||||||
BindQuota();
|
BindQuota();
|
||||||
var collectionUsers = ES.Services.RDS.GetRdsCollectionUsers(PanelRequest.CollectionID);
|
var collectionUsers = ES.Services.RDS.GetRdsCollectionUsers(PanelRequest.CollectionID);
|
||||||
var collection = ES.Services.RDS.GetRdsCollection(PanelRequest.CollectionID);
|
var collection = ES.Services.RDS.GetRdsCollection(PanelRequest.CollectionID);
|
||||||
|
var localAdmins = ES.Services.RDS.GetRdsCollectionLocalAdmins(PanelRequest.CollectionID);
|
||||||
|
|
||||||
|
foreach (var user in collectionUsers)
|
||||||
|
{
|
||||||
|
if (localAdmins.Select(l => l.AccountName).Contains(user.AccountName))
|
||||||
|
{
|
||||||
|
user.IsVIP = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
user.IsVIP = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
litCollectionName.Text = collection.DisplayName;
|
litCollectionName.Text = collection.DisplayName;
|
||||||
users.SetUsers(collectionUsers);
|
users.SetUsers(collectionUsers);
|
||||||
|
|
|
@ -4,6 +4,8 @@ using System.Linq;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
using System.Web.UI;
|
using System.Web.UI;
|
||||||
using System.Web.UI.WebControls;
|
using System.Web.UI.WebControls;
|
||||||
|
using WebsitePanel.Providers.HostedSolution;
|
||||||
|
using WebsitePanel.Providers.RemoteDesktopServices;
|
||||||
|
|
||||||
namespace WebsitePanel.Portal.RDS
|
namespace WebsitePanel.Portal.RDS
|
||||||
{
|
{
|
||||||
|
@ -17,6 +19,12 @@ namespace WebsitePanel.Portal.RDS
|
||||||
var collection = ES.Services.RDS.GetRdsCollection(PanelRequest.CollectionID);
|
var collection = ES.Services.RDS.GetRdsCollection(PanelRequest.CollectionID);
|
||||||
|
|
||||||
litCollectionName.Text = collection.DisplayName;
|
litCollectionName.Text = collection.DisplayName;
|
||||||
|
|
||||||
|
foreach(var user in collectionLocalAdmins)
|
||||||
|
{
|
||||||
|
user.IsVIP = false;
|
||||||
|
}
|
||||||
|
|
||||||
users.SetUsers(collectionLocalAdmins);
|
users.SetUsers(collectionLocalAdmins);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
<asp:LinkButton id="lnkDisplayName" meta:resourcekey="lnkDisplayName" runat="server" Text='<%# Eval("DisplayName")%>' CommandName="EditApplication" CommandArgument='<%# Eval("Alias") %>' OnClientClick="ShowProgressDialog('Loading ...');return true;"/>
|
<asp:LinkButton id="lnkDisplayName" meta:resourcekey="lnkDisplayName" runat="server" Text='<%# Eval("DisplayName")%>' CommandName="EditApplication" CommandArgument='<%# Eval("Alias") %>' OnClientClick="ShowProgressDialog('Loading ...');return true;"/>
|
||||||
<asp:HiddenField ID="hfFilePath" runat="server" Value='<%# Eval("FilePath") %>'/>
|
<asp:HiddenField ID="hfFilePath" runat="server" Value='<%# Eval("FilePath") %>'/>
|
||||||
<asp:HiddenField ID="hfRequiredCommandLine" runat="server" Value='<%# Eval("RequiredCommandLine") %>'/>
|
<asp:HiddenField ID="hfRequiredCommandLine" runat="server" Value='<%# Eval("RequiredCommandLine") %>'/>
|
||||||
|
<asp:HiddenField ID="hfUsers" runat="server" Value='<%# Eval("Users") != null ? "New" : null %>'/>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
|
|
|
@ -136,7 +136,7 @@ namespace WebsitePanel.Portal.RDS.UserControls
|
||||||
var fullRemote = new StartMenuApp
|
var fullRemote = new StartMenuApp
|
||||||
{
|
{
|
||||||
DisplayName = string.Format("Full Desktop - {0}", host.ToLower()),
|
DisplayName = string.Format("Full Desktop - {0}", host.ToLower()),
|
||||||
FilePath = "%SystemRoot%\\system32\\mstsc.exe",
|
FilePath = "c:\\windows\\system32\\mstsc.exe",
|
||||||
RequiredCommandLine = string.Format("/v:{0}", host.ToLower())
|
RequiredCommandLine = string.Format("/v:{0}", host.ToLower())
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -210,9 +210,16 @@ namespace WebsitePanel.Portal.RDS.UserControls
|
||||||
|
|
||||||
RemoteApplication app = new RemoteApplication();
|
RemoteApplication app = new RemoteApplication();
|
||||||
app.Alias = (string)gvApps.DataKeys[i][0];
|
app.Alias = (string)gvApps.DataKeys[i][0];
|
||||||
app.DisplayName = ((HyperLink)row.FindControl("lnkDisplayName")).Text;
|
app.DisplayName = ((LinkButton)row.FindControl("lnkDisplayName")).Text;
|
||||||
app.FilePath = ((HiddenField)row.FindControl("hfFilePath")).Value;
|
app.FilePath = ((HiddenField)row.FindControl("hfFilePath")).Value;
|
||||||
app.RequiredCommandLine = ((HiddenField)row.FindControl("hfRequiredCommandLine")).Value;
|
app.RequiredCommandLine = ((HiddenField)row.FindControl("hfRequiredCommandLine")).Value;
|
||||||
|
var users = ((HiddenField)row.FindControl("hfUsers")).Value;
|
||||||
|
|
||||||
|
if (users != null)
|
||||||
|
{
|
||||||
|
app.Users = new string[]{"New"};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (state == SelectedState.All ||
|
if (state == SelectedState.All ||
|
||||||
(state == SelectedState.Selected && chkSelect.Checked) ||
|
(state == SelectedState.Selected && chkSelect.Checked) ||
|
||||||
|
|
|
@ -23,8 +23,9 @@
|
||||||
<asp:TemplateField meta:resourcekey="gvUsersAccount" HeaderText="gvUsersAccount">
|
<asp:TemplateField meta:resourcekey="gvUsersAccount" HeaderText="gvUsersAccount">
|
||||||
<ItemStyle Width="96%" Wrap="false" HorizontalAlign="Left">
|
<ItemStyle Width="96%" Wrap="false" HorizontalAlign="Left">
|
||||||
</ItemStyle>
|
</ItemStyle>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="litAccount" runat="server" Text='<%# Eval("DisplayName") %>'></asp:Literal>
|
<asp:Literal ID="litAccount" runat="server" Text='<%# Eval("DisplayName") %>'></asp:Literal>
|
||||||
|
<asp:Image ID="Image1" runat="server" ImageUrl='<%# GetThemedImage("Exchange/admin_16.png") %>' Visible='<%# Convert.ToBoolean(Eval("IsVIP")) %>' ImageAlign="AbsMiddle" />
|
||||||
<asp:HiddenField ID="hdnSamAccountName" runat="server" Value='<%# Eval("SamAccountName") %>' />
|
<asp:HiddenField ID="hdnSamAccountName" runat="server" Value='<%# Eval("SamAccountName") %>' />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
@ -81,6 +82,7 @@
|
||||||
<asp:Image ID="imgAccount" runat="server" ImageUrl='<%# GetAccountImage((int)Eval("AccountType")) %>' ImageAlign="AbsMiddle" />
|
<asp:Image ID="imgAccount" 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>
|
||||||
<asp:HiddenField ID="hdnSamName" runat="server" Value='<%# Eval("SamAccountName") %>' />
|
<asp:HiddenField ID="hdnSamName" runat="server" Value='<%# Eval("SamAccountName") %>' />
|
||||||
|
<asp:HiddenField ID="hdnLocalAdmin" runat="server" Value='<%# Eval("IsVIP").ToString() %>' />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField meta:resourcekey="gvAccountsEmail">
|
<asp:TemplateField meta:resourcekey="gvAccountsEmail">
|
||||||
|
|
|
@ -132,6 +132,19 @@ namespace WebsitePanel.Portal.RDS.UserControls
|
||||||
protected void BindPopupAccounts()
|
protected void BindPopupAccounts()
|
||||||
{
|
{
|
||||||
OrganizationUser[] accounts = ES.Services.Organizations.GetOrganizationUsersPaged(PanelRequest.ItemID, null, null, null, 0, Int32.MaxValue).PageUsers;
|
OrganizationUser[] accounts = ES.Services.Organizations.GetOrganizationUsersPaged(PanelRequest.ItemID, null, null, null, 0, Int32.MaxValue).PageUsers;
|
||||||
|
var localAdmins = ES.Services.RDS.GetRdsCollectionLocalAdmins(PanelRequest.CollectionID);
|
||||||
|
|
||||||
|
foreach (var user in accounts)
|
||||||
|
{
|
||||||
|
if (localAdmins.Select(l => l.AccountName).Contains(user.AccountName))
|
||||||
|
{
|
||||||
|
user.IsVIP = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
user.IsVIP = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
accounts = accounts.Where(x => !GetUsers().Select(p => p.AccountName).Contains(x.AccountName)).ToArray();
|
accounts = accounts.Where(x => !GetUsers().Select(p => p.AccountName).Contains(x.AccountName)).ToArray();
|
||||||
Array.Sort(accounts, CompareAccount);
|
Array.Sort(accounts, CompareAccount);
|
||||||
|
@ -221,7 +234,8 @@ namespace WebsitePanel.Portal.RDS.UserControls
|
||||||
{
|
{
|
||||||
AccountName = (string)gvPopupAccounts.DataKeys[i][0],
|
AccountName = (string)gvPopupAccounts.DataKeys[i][0],
|
||||||
DisplayName = ((Literal)row.FindControl("litDisplayName")).Text,
|
DisplayName = ((Literal)row.FindControl("litDisplayName")).Text,
|
||||||
SamAccountName = ((HiddenField)row.FindControl("hdnSamName")).Value
|
SamAccountName = ((HiddenField)row.FindControl("hdnSamName")).Value,
|
||||||
|
IsVIP = Convert.ToBoolean(((HiddenField)row.FindControl("hdnLocalAdmin")).Value)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,13 +5,18 @@
|
||||||
<%@ Register Src="UserControls/UserDetails.ascx" TagName="UserDetails" TagPrefix="uc2" %>
|
<%@ Register Src="UserControls/UserDetails.ascx" TagName="UserDetails" TagPrefix="uc2" %>
|
||||||
<%@ Register Src="UserControls/CollapsiblePanel.ascx" TagName="CollapsiblePanel" TagPrefix="wsp" %>
|
<%@ Register Src="UserControls/CollapsiblePanel.ascx" TagName="CollapsiblePanel" TagPrefix="wsp" %>
|
||||||
<%@ Register Src="UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
|
<%@ Register Src="UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
|
||||||
|
<%@ Register Src="UserControls/PopupHeader.ascx" TagName="PopupHeader" TagPrefix="wsp" %>
|
||||||
|
<%@ Register Src="UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
|
||||||
|
|
||||||
<asp:UpdatePanel runat="server" ID="updatePanelUsers">
|
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/>
|
||||||
<ContentTemplate>
|
|
||||||
|
|
||||||
|
<asp:UpdatePanel runat="server" ID="messageBoxPanel" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
<wsp:SimpleMessageBox id="messageBox" runat="server" />
|
<wsp:SimpleMessageBox id="messageBox" runat="server" />
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
<div class="FormButtonsBar">
|
<div class="FormButtonsBar">
|
||||||
<div class="Left">
|
<div class="Left">
|
||||||
<asp:Button ID="btnAddRDSServer" runat="server"
|
<asp:Button ID="btnAddRDSServer" runat="server"
|
||||||
meta:resourcekey="btnAddRDSServer" Text="Add RDS Server" CssClass="Button3"
|
meta:resourcekey="btnAddRDSServer" Text="Add RDS Server" CssClass="Button3"
|
||||||
|
@ -28,11 +33,20 @@
|
||||||
<asp:ListItem>100</asp:ListItem>
|
<asp:ListItem>100</asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
|
|
||||||
<asp:TextBox ID="txtSearchValue" runat="server" CssClass="NormalTextBox" Width="100">
|
<asp:TextBox ID="txtSearchValue" runat="server" CssClass="NormalTextBox" Width="100"/>
|
||||||
</asp:TextBox><asp:ImageButton ID="cmdSearch" Runat="server" meta:resourcekey="cmdSearch" SkinID="SearchButton" CausesValidation="false"/>
|
<asp:ImageButton ID="cmdSearch" Runat="server" meta:resourcekey="cmdSearch" SkinID="SearchButton" CausesValidation="false"/>
|
||||||
</asp:Panel>
|
</asp:Panel>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<asp:ObjectDataSource ID="odsRDSServersPaged" runat="server" EnablePaging="True" SelectCountMethod="GetRDSServersPagedCount"
|
||||||
|
SelectMethod="GetRDSServersPaged" SortParameterName="sortColumn" TypeName="WebsitePanel.Portal.RDSHelper" OnSelected="odsRDSServersPaged_Selected">
|
||||||
|
<SelectParameters>
|
||||||
|
<asp:ControlParameter Name="filterValue" ControlID="txtSearchValue" PropertyName="Text" />
|
||||||
|
</SelectParameters>
|
||||||
|
</asp:ObjectDataSource>
|
||||||
|
|
||||||
|
<asp:UpdatePanel runat="server" ID="updatePanelUsers" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
|
||||||
<asp:GridView id="gvRDSServers" runat="server" AutoGenerateColumns="False"
|
<asp:GridView id="gvRDSServers" runat="server" AutoGenerateColumns="False"
|
||||||
AllowPaging="True" AllowSorting="True"
|
AllowPaging="True" AllowSorting="True"
|
||||||
|
@ -43,11 +57,45 @@
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField DataField="Name" HtmlEncode="true" SortExpression="Name" HeaderText="Server name">
|
<asp:BoundField DataField="Name" HtmlEncode="true" SortExpression="Name" HeaderText="Server name">
|
||||||
<HeaderStyle Wrap="false" />
|
<HeaderStyle Wrap="false" />
|
||||||
<ItemStyle Wrap="False" Width="25%"/>
|
<ItemStyle Wrap="False" Width="15%"/>
|
||||||
</asp:BoundField>
|
</asp:BoundField>
|
||||||
<asp:BoundField DataField="Address" HeaderText="IP Address"><ItemStyle Width="15%"/></asp:BoundField>
|
<asp:BoundField DataField="Address" HeaderText="IP Address"><ItemStyle Width="10%"/></asp:BoundField>
|
||||||
<asp:BoundField DataField="ItemName" HeaderText="Organization"><ItemStyle Width="20%"/></asp:BoundField>
|
<asp:BoundField DataField="ItemName" HeaderText="Organization"><ItemStyle Width="10%"/></asp:BoundField>
|
||||||
<asp:BoundField DataField="Description" HeaderText="Comments"><ItemStyle Width="30%"/></asp:BoundField>
|
<asp:BoundField DataField="Description" HeaderText="Comments"><ItemStyle Width="20%"/></asp:BoundField>
|
||||||
|
<asp:TemplateField meta:resourcekey="gvPopupStatus">
|
||||||
|
<ItemStyle Width="20%" HorizontalAlign="Left" />
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="litStatus" runat="server" Text='<%# Eval("Status") %>'></asp:Literal>
|
||||||
|
<asp:HiddenField ID="hdnRdsCollectionId" runat="server" Value='<%# Eval("RdsCollectionId") %>' />
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField meta:resourcekey="gvViewInfo">
|
||||||
|
<ItemStyle Width="8%" HorizontalAlign="Right"/>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:LinkButton OnClientClick="ShowProgressDialog('Getting Server Info ...');return true;" Visible='<%# Eval("Status") != null && Eval("Status").ToString().StartsWith("Online") %>' CommandName="ViewInfo" CommandArgument='<%# Eval("Id")%>' ID="lbViewInfo" runat="server" Text="View Info"/>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField meta:resourcekey="gvRestart">
|
||||||
|
<ItemStyle HorizontalAlign="Right"/>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:LinkButton ID="lbRestart" CommandName="Restart" CommandArgument='<%# Eval("Id")%>' Visible='<%# Eval("Status") != null && Eval("Status").ToString().StartsWith("Online") %>'
|
||||||
|
runat="server" Text="Restart" OnClientClick="if(confirm('Are you sure you want to restart selected server?')) ShowProgressDialog('Loading...'); else return false;"/>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField meta:resourcekey="gvShutdown">
|
||||||
|
<ItemStyle Width="9%" HorizontalAlign="Right"/>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:LinkButton ID="lbShutdown" CommandName="ShutDown" CommandArgument='<%# Eval("Id")%>' Visible='<%# Eval("Status") != null && Eval("Status").ToString().StartsWith("Online") %>'
|
||||||
|
runat="server" Text="Shut Down" OnClientClick="if(confirm('Are you sure you want to shut down selected server?')) ShowProgressDialog('Loading...'); else return false;"/>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:LinkButton ID="lnkInstallCertificate" runat="server" Text="Certificate" Visible='<%# Convert.ToBoolean(Eval("SslAvailable")) && Eval("ItemId") != null && Eval("Status") != null && Eval("Status").ToString().StartsWith("Online") %>'
|
||||||
|
CommandName="InstallCertificate" CommandArgument='<%# Eval("Id") %>' ToolTip="Repair Certificate"
|
||||||
|
OnClientClick="if(confirm('Are you sure you want to install certificate?')) ShowProgressDialog('Installing certificate...'); else return false;"></asp:LinkButton>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="lnkRemove" runat="server" Text="Remove" Visible='<%# Eval("ItemId") == null %>'
|
<asp:LinkButton ID="lnkRemove" runat="server" Text="Remove" Visible='<%# Eval("ItemId") == null %>'
|
||||||
|
@ -56,12 +104,105 @@
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
</Columns>
|
</Columns>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
<asp:ObjectDataSource ID="odsRDSServersPaged" runat="server" EnablePaging="True" SelectCountMethod="GetRDSServersPagedCount"
|
|
||||||
SelectMethod="GetRDSServersPaged" SortParameterName="sortColumn" TypeName="WebsitePanel.Portal.RDSHelper" OnSelected="odsRDSServersPaged_Selected">
|
<asp:Panel ID="ServerInfoPanel" runat="server" CssClass="Popup" style="display:none">
|
||||||
<SelectParameters>
|
<table class="Popup-Header" cellpadding="0" cellspacing="0">
|
||||||
<asp:ControlParameter Name="filterValue" ControlID="txtSearchValue" PropertyName="Text" />
|
<tr>
|
||||||
</SelectParameters>
|
<td class="Popup-HeaderLeft"/>
|
||||||
</asp:ObjectDataSource>
|
<td class="Popup-HeaderTitle">
|
||||||
</ContentTemplate>
|
<asp:Localize ID="Localize1" runat="server" meta:resourcekey="headerServerInfo"/>
|
||||||
|
</td>
|
||||||
|
<td class="Popup-HeaderRight"/>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<div class="Popup-Content">
|
||||||
|
<div class="Popup-Body">
|
||||||
|
<br />
|
||||||
|
<asp:UpdatePanel ID="serverInfoUpdatePanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="Popup-Scroll" style="height:auto;">
|
||||||
|
<wsp:CollapsiblePanel id="secServerInfo" runat="server" TargetControlID="panelHardwareInfo" meta:resourcekey="secRdsApplicationEdit" Text=""/>
|
||||||
|
<asp:Panel runat="server" ID="panelHardwareInfo">
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td class="FormLabel150" style="width: 150px;">
|
||||||
|
<asp:Literal ID="locProcessor" runat="server" Text="Processor:"/>
|
||||||
|
</td>
|
||||||
|
<td class="FormLabel150" style="width: 150px;">
|
||||||
|
<asp:Literal ID="litProcessor" runat="server"/>
|
||||||
|
</td>
|
||||||
|
<td class="FormLabel150" style="width: 150px;">
|
||||||
|
<asp:Literal ID="locLoadPercentage" Text="Load Percentage:" runat="server"/>
|
||||||
|
</td>
|
||||||
|
<td class="FormLabel150" style="width: 150px;">
|
||||||
|
<asp:Literal ID="litLoadPercentage" runat="server"/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="FormLabel150" style="width: 150px;">
|
||||||
|
<asp:Literal ID="locMemoryAllocated" runat="server" Text="Allocated Memory:"/>
|
||||||
|
</td>
|
||||||
|
<td class="FormLabel150" style="width: 150px;">
|
||||||
|
<asp:Literal ID="litMemoryAllocated" runat="server"/>
|
||||||
|
</td>
|
||||||
|
<td class="FormLabel150" style="width: 150px;">
|
||||||
|
<asp:Literal ID="locFreeMemory" Text="Free Memory:" runat="server"/>
|
||||||
|
</td>
|
||||||
|
<td class="FormLabel150" style="width: 150px;">
|
||||||
|
<asp:Literal ID="litFreeMemory" runat="server"/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</asp:Panel>
|
||||||
|
<wsp:CollapsiblePanel id="secRdsApplicationEdit" runat="server" TargetControlID="panelDiskDrives" meta:resourcekey="secRdsApplicationEdit" Text="Disk Drives"/>
|
||||||
|
<asp:Panel runat="server" ID="panelDiskDrives">
|
||||||
|
<table>
|
||||||
|
<asp:Repeater ID="rpServerDrives" runat="server" EnableViewState="false">
|
||||||
|
<ItemTemplate>
|
||||||
|
<tr>
|
||||||
|
<td class="FormLabel150" style="width: 150px;">
|
||||||
|
<asp:Literal ID="litDeviceId" runat="server" Text='<%# Eval("DeviceId") %>'/>
|
||||||
|
</td>
|
||||||
|
<td class="FormLabel150" style="width: 150px;"/>
|
||||||
|
<td class="FormLabel150" style="width: 150px;">
|
||||||
|
<asp:Literal ID="locVolumeName" Text="Volume Name:" runat="server"/>
|
||||||
|
</td>
|
||||||
|
<td class="FormLabel150" style="width: 150px;">
|
||||||
|
<asp:Literal ID="litVolumeName" Text='<%# Eval("VolumeName") %>' runat="server"/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="FormLabel150" style="width: 150px;">
|
||||||
|
<asp:Literal ID="locSize" Text="Size:" runat="server"/>
|
||||||
|
</td>
|
||||||
|
<td class="FormLabel150" style="width: 150px;">
|
||||||
|
<asp:Literal ID="litSize" Text='<%# Eval("SizeMb") + " MB" %>' runat="server"/>
|
||||||
|
</td>
|
||||||
|
<td class="FormLabel150" style="width: 150px;">
|
||||||
|
<asp:Literal ID="locFreeSpace" Text="Free Space:" runat="server"/>
|
||||||
|
</td>
|
||||||
|
<td class="FormLabel150" style="width: 150px;">
|
||||||
|
<asp:Literal ID="litFreeSpace" Text='<%# Eval("FreeSpaceMb") + " MB" %>' runat="server"/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:Repeater>
|
||||||
|
</table>
|
||||||
|
</asp:Panel>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
<br />
|
||||||
|
</div>
|
||||||
|
<div class="FormFooter">
|
||||||
|
<asp:Button ID="btnCancelServerInfo" runat="server" CssClass="Button1" meta:resourcekey="btnServerInfoCancel" Text="Cancel" CausesValidation="false" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</asp:Panel>
|
||||||
|
|
||||||
|
<asp:Button ID="btnViewInfoFake" runat="server" style="display:none;" />
|
||||||
|
<ajaxToolkit:ModalPopupExtender ID="ViewInfoModal" runat="server" TargetControlID="btnViewInfoFake" PopupControlID="ServerInfoPanel"
|
||||||
|
BackgroundCssClass="modalBackground" DropShadow="false" CancelControlID="btnCancelServerInfo"/>
|
||||||
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
|
@ -31,6 +31,7 @@ using System.Data;
|
||||||
using System.Configuration;
|
using System.Configuration;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
|
using System.Linq;
|
||||||
using System.Web.Security;
|
using System.Web.Security;
|
||||||
using System.Web.UI;
|
using System.Web.UI;
|
||||||
using System.Web.UI.WebControls;
|
using System.Web.UI.WebControls;
|
||||||
|
@ -39,13 +40,14 @@ using System.Web.UI.HtmlControls;
|
||||||
|
|
||||||
using WebsitePanel.EnterpriseServer;
|
using WebsitePanel.EnterpriseServer;
|
||||||
using WebsitePanel.Providers.Common;
|
using WebsitePanel.Providers.Common;
|
||||||
|
using AjaxControlToolkit;
|
||||||
|
|
||||||
namespace WebsitePanel.Portal
|
namespace WebsitePanel.Portal
|
||||||
{
|
{
|
||||||
public partial class RDSServers : WebsitePanelModuleBase
|
public partial class RDSServers : WebsitePanelModuleBase
|
||||||
{
|
{
|
||||||
protected void Page_Load(object sender, EventArgs e)
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (!IsPostBack)
|
if (!IsPostBack)
|
||||||
{
|
{
|
||||||
gvRDSServers.PageSize = Convert.ToInt16(ddlPageSize.SelectedValue);
|
gvRDSServers.PageSize = Convert.ToInt16(ddlPageSize.SelectedValue);
|
||||||
|
@ -99,6 +101,28 @@ namespace WebsitePanel.Portal
|
||||||
ShowErrorMessage("REMOTE_DESKTOP_SERVICES_REMOVE_RDSSERVER", ex);
|
ShowErrorMessage("REMOTE_DESKTOP_SERVICES_REMOVE_RDSSERVER", ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (e.CommandName == "ViewInfo")
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
ShowInfo(e.CommandArgument.ToString());
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (e.CommandName == "Restart")
|
||||||
|
{
|
||||||
|
Restart(e.CommandArgument.ToString());
|
||||||
|
}
|
||||||
|
else if (e.CommandName == "ShutDown")
|
||||||
|
{
|
||||||
|
ShutDown(e.CommandArgument.ToString());
|
||||||
|
}
|
||||||
|
else if (e.CommandName == "InstallCertificate")
|
||||||
|
{
|
||||||
|
InstallCertificate(e.CommandArgument.ToString());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
|
@ -107,5 +131,60 @@ namespace WebsitePanel.Portal
|
||||||
|
|
||||||
gvRDSServers.DataBind();
|
gvRDSServers.DataBind();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void ShowInfo(string serverId)
|
||||||
|
{
|
||||||
|
ViewInfoModal.Show();
|
||||||
|
var rdsServer = ES.Services.RDS.GetRdsServer(Convert.ToInt32(serverId));
|
||||||
|
var serverInfo = ES.Services.RDS.GetRdsServerInfo(rdsServer.ItemId.Value, rdsServer.FqdName);
|
||||||
|
litProcessor.Text = string.Format("{0}x{1} MHz", serverInfo.NumberOfCores, serverInfo.MaxClockSpeed);
|
||||||
|
litLoadPercentage.Text = string.Format("{0}%", serverInfo.LoadPercentage);
|
||||||
|
litMemoryAllocated.Text = string.Format("{0} MB", serverInfo.MemoryAllocatedMb);
|
||||||
|
litFreeMemory.Text = string.Format("{0} MB", serverInfo.FreeMemoryMb);
|
||||||
|
rpServerDrives.DataSource = serverInfo.Drives;
|
||||||
|
rpServerDrives.DataBind();
|
||||||
|
((ModalPopupExtender)asyncTasks.FindControl("ModalPopupProperties")).Hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Restart(string serverId)
|
||||||
|
{
|
||||||
|
var rdsServer = ES.Services.RDS.GetRdsServer(Convert.ToInt32(serverId));
|
||||||
|
ES.Services.RDS.RestartRdsServer(rdsServer.ItemId.Value, rdsServer.FqdName);
|
||||||
|
Response.Redirect(Request.Url.ToString(), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ShutDown(string serverId)
|
||||||
|
{
|
||||||
|
var rdsServer = ES.Services.RDS.GetRdsServer(Convert.ToInt32(serverId));
|
||||||
|
ES.Services.RDS.ShutDownRdsServer(rdsServer.ItemId.Value, rdsServer.FqdName);
|
||||||
|
Response.Redirect(Request.Url.ToString(), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void RefreshServerInfo()
|
||||||
|
{
|
||||||
|
var servers = odsRDSServersPaged.Select();
|
||||||
|
gvRDSServers.DataSource = servers;
|
||||||
|
gvRDSServers.DataBind();
|
||||||
|
((ModalPopupExtender)asyncTasks.FindControl("ModalPopupProperties")).Hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void InstallCertificate(string serverId)
|
||||||
|
{
|
||||||
|
var rdsServer = ES.Services.RDS.GetRdsServer(Convert.ToInt32(serverId));
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
ES.Services.RDS.InstallSessionHostsCertificate(rdsServer);
|
||||||
|
((ModalPopupExtender)asyncTasks.FindControl("ModalPopupProperties")).Hide();
|
||||||
|
ShowSuccessMessage("RDSSESSIONHOST_CERTIFICATE_INSTALLED");
|
||||||
|
}
|
||||||
|
catch(Exception ex)
|
||||||
|
{
|
||||||
|
ShowErrorMessage("RDSSESSIONHOST_CERTIFICATE_NOT_INSTALLED", ex);
|
||||||
|
}
|
||||||
|
|
||||||
|
messageBoxPanel.Update();
|
||||||
|
// Response.Redirect(Request.Url.ToString(), true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,31 +1,3 @@
|
||||||
// Copyright (c) 2015, 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.
|
||||||
|
@ -41,13 +13,22 @@ namespace WebsitePanel.Portal {
|
||||||
public partial class RDSServers {
|
public partial class RDSServers {
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// updatePanelUsers control.
|
/// asyncTasks 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 updatePanelUsers;
|
protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// messageBoxPanel 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 messageBoxPanel;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// messageBox control.
|
/// messageBox control.
|
||||||
|
@ -112,6 +93,24 @@ namespace WebsitePanel.Portal {
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::System.Web.UI.WebControls.ImageButton cmdSearch;
|
protected global::System.Web.UI.WebControls.ImageButton cmdSearch;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// odsRDSServersPaged 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.ObjectDataSource odsRDSServersPaged;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// updatePanelUsers 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 updatePanelUsers;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// gvRDSServers control.
|
/// gvRDSServers control.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -122,12 +121,174 @@ namespace WebsitePanel.Portal {
|
||||||
protected global::System.Web.UI.WebControls.GridView gvRDSServers;
|
protected global::System.Web.UI.WebControls.GridView gvRDSServers;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// odsRDSServersPaged control.
|
/// ServerInfoPanel 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.ObjectDataSource odsRDSServersPaged;
|
protected global::System.Web.UI.WebControls.Panel ServerInfoPanel;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Localize1 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 Localize1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// serverInfoUpdatePanel 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 serverInfoUpdatePanel;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// secServerInfo control.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Auto-generated field.
|
||||||
|
/// To modify move field declaration from designer file to code-behind file.
|
||||||
|
/// </remarks>
|
||||||
|
protected global::WebsitePanel.Portal.CollapsiblePanel secServerInfo;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// panelHardwareInfo 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 panelHardwareInfo;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// locProcessor 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 locProcessor;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// litProcessor 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 litProcessor;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// locLoadPercentage 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 locLoadPercentage;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// litLoadPercentage 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 litLoadPercentage;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// locMemoryAllocated 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 locMemoryAllocated;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// litMemoryAllocated 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 litMemoryAllocated;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// locFreeMemory 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 locFreeMemory;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// litFreeMemory 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 litFreeMemory;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// secRdsApplicationEdit control.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Auto-generated field.
|
||||||
|
/// To modify move field declaration from designer file to code-behind file.
|
||||||
|
/// </remarks>
|
||||||
|
protected global::WebsitePanel.Portal.CollapsiblePanel secRdsApplicationEdit;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// panelDiskDrives 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 panelDiskDrives;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// rpServerDrives 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.Repeater rpServerDrives;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnCancelServerInfo 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 btnCancelServerInfo;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnViewInfoFake 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 btnViewInfoFake;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ViewInfoModal control.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Auto-generated field.
|
||||||
|
/// To modify move field declaration from designer file to code-behind file.
|
||||||
|
/// </remarks>
|
||||||
|
protected global::AjaxControlToolkit.ModalPopupExtender ViewInfoModal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,16 +11,16 @@
|
||||||
<div class="FormContentRDSConf">
|
<div class="FormContentRDSConf">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="FormLabel150"><asp:Localize ID="locServerName" runat="server" meta:resourcekey="locServerName" Text="Server Full Name:"></asp:Localize></td>
|
<td class="FormLabel260"><asp:Localize ID="locServerName" runat="server" meta:resourcekey="locServerName" Text="Server Fully Qualified Domain Name:"></asp:Localize></td>
|
||||||
<td>
|
<td>
|
||||||
<asp:TextBox ID="txtServerName" runat="server" CssClass="NormalTextBox" Width="145px"></asp:TextBox>
|
<asp:TextBox ID="txtServerName" runat="server" CssClass="NormalTextBox" Width="300px"></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="valServerName" runat="server" ErrorMessage="*" ControlToValidate="txtServerName"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="valServerName" runat="server" ErrorMessage="*" ControlToValidate="txtServerName"></asp:RequiredFieldValidator>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="FormLabel150"><asp:Localize ID="locServerComments" runat="server" meta:resourcekey="locServerComments" Text="Server Comments:"></asp:Localize></td>
|
<td class="FormLabel260"><asp:Localize ID="locServerComments" runat="server" meta:resourcekey="locServerComments" Text="Server Comments:"></asp:Localize></td>
|
||||||
<td>
|
<td>
|
||||||
<asp:TextBox ID="txtServerComments" runat="server" CssClass="NormalTextBox" Width="145px"></asp:TextBox>
|
<asp:TextBox ID="txtServerComments" runat="server" CssClass="NormalTextBox" Width="300px"></asp:TextBox>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -62,8 +62,8 @@ namespace WebsitePanel.Portal
|
||||||
ResultObject result = ES.Services.RDS.AddRdsServer(rdsServer);
|
ResultObject result = ES.Services.RDS.AddRdsServer(rdsServer);
|
||||||
|
|
||||||
if (!result.IsSuccess && result.ErrorCodes.Count > 0)
|
if (!result.IsSuccess && result.ErrorCodes.Count > 0)
|
||||||
{
|
{
|
||||||
messageBox.ShowMessage(result, "", "");
|
messageBox.ShowMessage(result, "RDSSERVER_NOT_ADDED", "");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ namespace WebsitePanel.Portal
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
messageBox.ShowErrorMessage("", ex);
|
ShowErrorMessage("RDSSERVER_NOT_ADDED", ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,31 +1,3 @@
|
||||||
// Copyright (c) 2015, 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.
|
||||||
|
|
|
@ -211,6 +211,20 @@
|
||||||
<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\EnterpriseStorageFolderSettingsFolderPermissions.ascx.cs">
|
||||||
|
<DependentUpon>EnterpriseStorageFolderSettingsFolderPermissions.ascx</DependentUpon>
|
||||||
|
<SubType>ASPXCodeBehind</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="ExchangeServer\EnterpriseStorageFolderSettingsFolderPermissions.ascx.designer.cs">
|
||||||
|
<DependentUpon>EnterpriseStorageFolderSettingsFolderPermissions.ascx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="ExchangeServer\EnterpriseStorageFolderSettingsOwaEditing.ascx.cs">
|
||||||
|
<DependentUpon>EnterpriseStorageFolderSettingsOwaEditing.ascx</DependentUpon>
|
||||||
|
<SubType>ASPXCodeBehind</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="ExchangeServer\EnterpriseStorageFolderSettingsOwaEditing.ascx.designer.cs">
|
||||||
|
<DependentUpon>EnterpriseStorageFolderSettingsOwaEditing.ascx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="ExchangeServer\OrganizationDeletedUsers.ascx.cs">
|
<Compile Include="ExchangeServer\OrganizationDeletedUsers.ascx.cs">
|
||||||
<DependentUpon>OrganizationDeletedUsers.ascx</DependentUpon>
|
<DependentUpon>OrganizationDeletedUsers.ascx</DependentUpon>
|
||||||
<SubType>ASPXCodeBehind</SubType>
|
<SubType>ASPXCodeBehind</SubType>
|
||||||
|
@ -229,6 +243,20 @@
|
||||||
<DependentUpon>OrganizationDeletedUserGeneralSettings.ascx</DependentUpon>
|
<DependentUpon>OrganizationDeletedUserGeneralSettings.ascx</DependentUpon>
|
||||||
<SubType>ASPXCodeBehind</SubType>
|
<SubType>ASPXCodeBehind</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="ExchangeServer\UserControls\EnterpriseStorageEditFolderTabs.ascx.cs">
|
||||||
|
<DependentUpon>EnterpriseStorageEditFolderTabs.ascx</DependentUpon>
|
||||||
|
<SubType>ASPXCodeBehind</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="ExchangeServer\UserControls\EnterpriseStorageEditFolderTabs.ascx.designer.cs">
|
||||||
|
<DependentUpon>EnterpriseStorageEditFolderTabs.ascx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="ExchangeServer\UserControls\EnterpriseStorageOwaUsersList.ascx.cs">
|
||||||
|
<DependentUpon>EnterpriseStorageOwaUsersList.ascx</DependentUpon>
|
||||||
|
<SubType>ASPXCodeBehind</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="ExchangeServer\UserControls\EnterpriseStorageOwaUsersList.ascx.designer.cs">
|
||||||
|
<DependentUpon>EnterpriseStorageOwaUsersList.ascx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="ProviderControls\SmarterMail100_EditAccount.ascx.cs">
|
<Compile Include="ProviderControls\SmarterMail100_EditAccount.ascx.cs">
|
||||||
<DependentUpon>SmarterMail100_EditAccount.ascx</DependentUpon>
|
<DependentUpon>SmarterMail100_EditAccount.ascx</DependentUpon>
|
||||||
<SubType>ASPXCodeBehind</SubType>
|
<SubType>ASPXCodeBehind</SubType>
|
||||||
|
@ -4455,7 +4483,11 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="ApplyEnableHardQuotaFeature.ascx" />
|
<Content Include="ApplyEnableHardQuotaFeature.ascx" />
|
||||||
|
<Content Include="ExchangeServer\EnterpriseStorageFolderSettingsFolderPermissions.ascx" />
|
||||||
|
<Content Include="ExchangeServer\EnterpriseStorageFolderSettingsOwaEditing.ascx" />
|
||||||
<Content Include="ExchangeServer\ExchangeCheckDomainName.ascx" />
|
<Content Include="ExchangeServer\ExchangeCheckDomainName.ascx" />
|
||||||
|
<Content Include="ExchangeServer\UserControls\EnterpriseStorageEditFolderTabs.ascx" />
|
||||||
|
<Content Include="ExchangeServer\UserControls\EnterpriseStorageOwaUsersList.ascx" />
|
||||||
<Content Include="ProviderControls\SmarterMail100_EditAccount.ascx" />
|
<Content Include="ProviderControls\SmarterMail100_EditAccount.ascx" />
|
||||||
<Content Include="ProviderControls\SmarterMail100_EditDomain.ascx" />
|
<Content Include="ProviderControls\SmarterMail100_EditDomain.ascx" />
|
||||||
<Content Include="ProviderControls\SmarterMail100_EditDomain_Features.ascx" />
|
<Content Include="ProviderControls\SmarterMail100_EditDomain_Features.ascx" />
|
||||||
|
@ -4499,6 +4531,10 @@
|
||||||
<Content Include="ProviderControls\App_LocalResources\SmarterMail100_EditList.ascx.resx">
|
<Content Include="ProviderControls\App_LocalResources\SmarterMail100_EditList.ascx.resx">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Content>
|
</Content>
|
||||||
|
<Content Include="ExchangeServer\UserControls\App_LocalResources\EnterpriseStorageEditFolderTabs.ascx.resx" />
|
||||||
|
<Content Include="ExchangeServer\App_LocalResources\EnterpriseStorageFolderSettingsFolderPermissions.ascx.resx" />
|
||||||
|
<Content Include="ExchangeServer\UserControls\App_LocalResources\EnterpriseStorageOwaUsersList.ascx.resx" />
|
||||||
|
<Content Include="ExchangeServer\App_LocalResources\EnterpriseStorageFolderSettingsOwaEditing.ascx.resx" />
|
||||||
<EmbeddedResource Include="RDS\App_LocalResources\RDSEditCollectionSettings.ascx.resx" />
|
<EmbeddedResource Include="RDS\App_LocalResources\RDSEditCollectionSettings.ascx.resx" />
|
||||||
<Content Include="RDS\AssignedRDSServers.ascx" />
|
<Content Include="RDS\AssignedRDSServers.ascx" />
|
||||||
<Content Include="RDS\AddRDSServer.ascx" />
|
<Content Include="RDS\AddRDSServer.ascx" />
|
||||||
|
@ -5678,7 +5714,9 @@
|
||||||
<Content Include="VPSForPC\App_LocalResources\VpsDetailsGeneral.ascx.resx">
|
<Content Include="VPSForPC\App_LocalResources\VpsDetailsGeneral.ascx.resx">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Content>
|
</Content>
|
||||||
<Content Include="App_LocalResources\WebsitesSSL.ascx.resx" />
|
<Content Include="App_LocalResources\WebsitesSSL.ascx.resx">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Content>
|
||||||
<Content Include="VPSForPC\App_LocalResources\VpsDetailsHelp.ascx.resx">
|
<Content Include="VPSForPC\App_LocalResources\VpsDetailsHelp.ascx.resx">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Content>
|
</Content>
|
||||||
|
@ -5864,7 +5902,9 @@
|
||||||
</Content>
|
</Content>
|
||||||
<Content Include="RDS\UserControls\App_LocalResources\RDSCollectionUsers.ascx.resx" />
|
<Content Include="RDS\UserControls\App_LocalResources\RDSCollectionUsers.ascx.resx" />
|
||||||
<Content Include="RDS\UserControls\App_LocalResources\RDSCollectionServers.ascx.resx" />
|
<Content Include="RDS\UserControls\App_LocalResources\RDSCollectionServers.ascx.resx" />
|
||||||
<Content Include="RDS\UserControls\App_LocalResources\RDSCollectionApps.ascx.resx" />
|
<Content Include="RDS\UserControls\App_LocalResources\RDSCollectionApps.ascx.resx">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Content>
|
||||||
<Content Include="ProviderControls\App_LocalResources\RDS_Settings.ascx.resx" />
|
<Content Include="ProviderControls\App_LocalResources\RDS_Settings.ascx.resx" />
|
||||||
<Content Include="UserControls\App_LocalResources\DomainControl.ascx.resx">
|
<Content Include="UserControls\App_LocalResources\DomainControl.ascx.resx">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue