From 805a74ba65e3237cf5b7fb9c1ff8cdd6da260370 Mon Sep 17 00:00:00 2001 From: robvde Date: Sun, 29 Sep 2013 19:33:26 +0400 Subject: [PATCH] Partial Checkin --- .../HostedSolution/LyncController.cs | 2 +- .../HostedSolution/ActiveDirectoryUtils.cs | 2 - .../OS/SystemFile.cs | 14 ++ .../App_Data/WebsitePanel_Modules.config | 2 + .../App_Themes/Default/Icons.skin | 3 + .../App_Themes/Default/Images/spaces16.png | Bin 0 -> 780 bytes .../App_Themes/Default/Images/spaces48.png | Bin 0 -> 5439 bytes .../EnterpriseStorageSpaces.ascx.resx | 159 ++++++++++++++++ .../EnterpriseStorageSpaces.ascx | 84 +++++++++ .../EnterpriseStorageSpaces.ascx.cs | 172 ++++++++++++++++++ .../EnterpriseStorageSpaces.ascx.designer.cs | 105 +++++++++++ .../App_LocalResources/Menu.ascx.resx | 8 +- .../ExchangeServer/UserControls/Menu.ascx.cs | 16 ++ .../WebsitePanel.Portal.Modules.csproj | 12 ++ .../WebsitePanel.WebPortal.csproj | 2 + 15 files changed, 577 insertions(+), 4 deletions(-) create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Images/spaces16.png create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Images/spaces48.png create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/EnterpriseStorageSpaces.ascx.resx create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/EnterpriseStorageSpaces.ascx create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/EnterpriseStorageSpaces.ascx.cs create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/EnterpriseStorageSpaces.ascx.designer.cs diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/LyncController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/LyncController.cs index d4f352f2..c9aaffe0 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/LyncController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/LyncController.cs @@ -1050,7 +1050,7 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution ret = lync.GetPolicyList(type, name); } } - catch (Exception ex) + catch (Exception) { } finally diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ActiveDirectoryUtils.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ActiveDirectoryUtils.cs index ed0332dc..ed271941 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ActiveDirectoryUtils.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ActiveDirectoryUtils.cs @@ -73,8 +73,6 @@ namespace WebsitePanel.Providers.HostedSolution foreach (string str in props) { - string groupName = ""; - string[] parts = str.Split(','); for (int i = 0; i < parts.Length; i++) { diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/OS/SystemFile.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/OS/SystemFile.cs index 1030c519..c76cb539 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/OS/SystemFile.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/OS/SystemFile.cs @@ -43,6 +43,7 @@ namespace WebsitePanel.Providers.OS private long size; private long quota; private bool isEmpty; + private bool isPublished; public SystemFile() { @@ -89,10 +90,23 @@ namespace WebsitePanel.Providers.OS set { size = value; } } + public long Quota + { + get { return quota; } + set { quota = value; } + } + public bool IsEmpty { get { return this.isEmpty; } set { this.isEmpty = value; } } + + public bool IsPublished + { + get { return this.isPublished; } + set { this.isPublished = value; } + } + } } diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Modules.config b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Modules.config index 26ba29ee..ab57a7c8 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Modules.config +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Modules.config @@ -550,6 +550,8 @@ + + diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Icons.skin b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Icons.skin index 5f9f29c4..4d334ddb 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Icons.skin +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Icons.skin @@ -92,3 +92,6 @@ Default skin template. The following skins are provided as examples only. + +<%-- Enterprise Storage Icons --%> + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Images/spaces16.png b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Images/spaces16.png new file mode 100644 index 0000000000000000000000000000000000000000..973a7b951350bd1c9155cf50dfe69d28ac6156db GIT binary patch literal 780 zcmV+n1M~ceP)wdlDnrWJ)Y4_E zf)*_*Xw#x13fe?%f)=f#0*N4MQ4|?k*bhZ$VWmUbG&0U}-kW)U_pkHb(~;@I;a=`N z=ljn2zN;^7>4o;Tb5s5O_70L&5a%vTkHK4< z#@VH-&})Soin|PfUqyQOo~CEoc3|P>Lv-~Yf=}5x4_&y9h06R}n9)ULaTcNP!ms3$ zi&Yjqdl>omr?Ii;AdIFK6sMk|>DXf}W{s9_kD_WX0W+`B+PN80iTFNFs4W-ZSIh8g z6&MPz`5!d*-KLi(NkZ|*8wjo-g#hD#3{CKvYiN%U{L-l6{wzeuC_z$U2$jkqHFQUd zDFmB^xxNoklT#B{(6?uhB=O;_^rl0hzL;MFbCU?7dETG>{ zHpIn&m+YL;UZZ~_>3g^|7LNlZ?8D>m&sg07x@@OJIj(6GMNPyYa+3cFoAIRPL50000< KMNUMnLSTZ9&|-lA literal 0 HcmV?d00001 diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Images/spaces48.png b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Images/spaces48.png new file mode 100644 index 0000000000000000000000000000000000000000..4a4bbf315002eb8759fe4e9c3e37a8a588369f7a GIT binary patch literal 5439 zcmV-F6~O9=P)KLZ*U+5Lu!Sk^o_Z5E4Meg@_7P6crJiNL9pw)e1;Xm069{HJUZAPk55R%$-RIA z6-eL&AQ0xu!e<4=008gy@A0LT~suv4>S3ILP<0Bm`DLLvaF4FK%)Nj?Pt*r}7;7Xa9z9H|HZjR63e zC`Tj$K)V27Re@400>HumpsYY5E(E}?0f1SyGDiY{y#)Yvj#!WnKwtoXnL;eg03bL5 z07D)V%>y7z1E4U{zu>7~aD})?0RX_umCct+(lZpemCzb@^6=o|A>zVpu|i=NDG+7} zl4`aK{0#b-!z=TL9Wt0BGO&T{GJWpjryhdijfaIQ&2!o}p04JRKYg3k&Tf zVxhe-O!X z{f;To;xw^bEES6JSc$k$B2CA6xl)ltA<32E66t?3@gJ7`36pmX0IY^jz)rRYwaaY4 ze(nJRiw;=Qb^t(r^DT@T3y}a2XEZW-_W%Hszxj_qD**t_m!#tW0KDiJT&R>6OvVTR z07RgHDzHHZ48atvzz&?j9lXF70$~P3Knx_nJP<+#`N z#-MZ2bTkiLfR>_b(HgWKJ%F~Nr_oF3b#wrIijHG|(J>BYjM-sajE6;FiC7vY#};Gd zST$CUHDeuEH+B^pz@B062qXfFfD`NpUW5?BY=V%GM_5c)L#QR}BeW8_2v-S%gfYS= zB9o|3v?Y2H`NVi)In3rTB8+ej^> zQ=~r95NVuDChL%G$=>7$vVg20myx%S50Foi`^m%Pw-h?Xh~i8Mq9jtJloCocWk2Nv zrJpiFnV_ms&8eQ$2&#xWpIS+6pmtC%Q-`S&GF4Q#^mhymh7E(qNMa}%Y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4Iu7;AH9K?p-L;v&yu0=^ z02DopeBxm7?n4uWPrr6z?b)R|E;89IudL|J2Irr>co}ca)Dc(#u=3+$Gv9mvfv+C@ zNxneRZpwVb4DIc_pl$?MKR(-d<@jvlmH3)sK + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Add New Space + + + if(!confirm('Are you sure you want to delete selected space?')) return false; else ShowProgressDialog('Deleting Space...'); + + + Delete + + + Delete Space + + + No spaces have been added yet. To add a new space click "Add New Space" button. + + + Space Name + + + + + + Total Spaces Allocated: + + + Enterprise Storage Spaces + + + Enterprise Storage Spaces + + + Manage + + + Publish + + + Quota + + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/EnterpriseStorageSpaces.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/EnterpriseStorageSpaces.ascx new file mode 100644 index 00000000..d90bbb46 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/EnterpriseStorageSpaces.ascx @@ -0,0 +1,84 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="EnterpriseStorageSpaces.ascx.cs" Inherits="WebsitePanel.Portal.ExchangeServer.EnterpriseStorageSpaces" %> +<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %> +<%@ Register Src="UserControls/Menu.ascx" TagName="Menu" TagPrefix="wsp" %> +<%@ Register Src="UserControls/Breadcrumb.ascx" TagName="Breadcrumb" TagPrefix="wsp" %> +<%@ Register Src="../UserControls/QuotaViewer.ascx" TagName="QuotaViewer" TagPrefix="wsp" %> +<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %> + + + +

+
+
+ +
+
+ +
+
+
+
+ + +
+
+ + +
+ +
+ + + + + + + + + + + +
+ +
+
+
+ + +
+ meta:resourcekey="btnPublish" runat="server" CommandName="Publish" CommandArgument='<%# Eval("Name") + "|" + Eval("IsPublished").ToString() %>'/> +
+
+
+ + +
+ +
+
+
+ + +   + + +
+
+
+ + +     + + + +
+
+
+
+
\ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/EnterpriseStorageSpaces.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/EnterpriseStorageSpaces.ascx.cs new file mode 100644 index 00000000..9de6ea49 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/EnterpriseStorageSpaces.ascx.cs @@ -0,0 +1,172 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Web.UI.WebControls; +using WebsitePanel.EnterpriseServer; +using WebsitePanel.Providers.HostedSolution; + +namespace WebsitePanel.Portal.ExchangeServer +{ + public partial class EnterpriseStorageSpaces : WebsitePanelModuleBase + { + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + BindStats(); + + // bind domain names + BindEnterpriseStorageSpaces(); + } + + + } + + private void BindStats() + { + // set quotas + OrganizationStatistics stats = ES.Services.Organizations.GetOrganizationStatisticsByOrganization(PanelRequest.ItemID); + OrganizationStatistics tenantStats = ES.Services.Organizations.GetOrganizationStatistics(PanelRequest.ItemID); + spacesQuota.QuotaUsedValue = stats.CreatedEnterpriseStorageFolders; + spacesQuota.QuotaValue = stats.AllocatedEnterpriseStorageFolders; + if (stats.AllocatedEnterpriseStorageFolders != -1) spacesQuota.QuotaAvailable = tenantStats.AllocatedEnterpriseStorageFolders - tenantStats.CreatedEnterpriseStorageFolders; + } + + public string GetSpaceRecordsEditUrl(string spaceName) + { + return EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "enterprisestorage_edit", + "SpaceName=" + spaceName, + "ItemID=" + PanelRequest.ItemID); + } + + private void BindEnterpriseStorageSpaces() + { + WebsitePanel.Providers.OS.SystemFile[] list = ES.Services.EnterpriseStorage.GetEnterpriseFolders(PanelRequest.ItemID); + + gvSpaces.DataSource = list; + gvSpaces.DataBind(); + } + + public string IsPublished(bool val) + { + return val ? "UnPublish" : "Publish"; + } + + protected void btnAddSpace_Click(object sender, EventArgs e) + { + + Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), "enterprisestorage_add", + "SpaceID=" + PanelSecurity.PackageId)); + } + + protected void gvDomains_RowCommand(object sender, GridViewCommandEventArgs e) + { + if (e.CommandName == "DeleteItem") + { + // delete domain + int domainId = Utils.ParseInt(e.CommandArgument.ToString(), 0); + + try + { + int result = ES.Services.Organizations.DeleteOrganizationDomain(PanelRequest.ItemID, domainId); + if (result < 0) + { + messageBox.ShowErrorMessage("EXCHANGE_UNABLE_TO_DELETE_DOMAIN"); + } + + // rebind domains + BindDomainNames(); + + BindStats(); + } + catch (Exception ex) + { + ShowErrorMessage("EXCHANGE_DELETE_DOMAIN", ex); + } + } + else if (e.CommandName == "Change") + { + string[] commandArgument = e.CommandArgument.ToString().Split('|'); + int domainId = Utils.ParseInt(commandArgument[0].ToString(), 0); + ExchangeAcceptedDomainType acceptedDomainType = (ExchangeAcceptedDomainType)Enum.Parse(typeof(ExchangeAcceptedDomainType), commandArgument[1]); + + + try + { + + ExchangeAcceptedDomainType newDomainType = ExchangeAcceptedDomainType.Authoritative; + if (acceptedDomainType == ExchangeAcceptedDomainType.Authoritative) + newDomainType = ExchangeAcceptedDomainType.InternalRelay; + + int result = ES.Services.Organizations.ChangeOrganizationDomainType(PanelRequest.ItemID, domainId, newDomainType); + if (result < 0) + { + messageBox.ShowResultMessage(result); + return; + } + + // rebind domains + BindDomainNames(); + + BindStats(); + } + catch (Exception ex) + { + ShowErrorMessage("EXCHANGE_CHANGE_DOMAIN", ex); + } + } + } + + protected void btnSetDefaultDomain_Click(object sender, EventArgs e) + { + // get domain + int domainId = Utils.ParseInt(Request.Form["DefaultDomain"], 0); + + try + { + int result = ES.Services.Organizations.SetOrganizationDefaultDomain(PanelRequest.ItemID, domainId); + if (result < 0) + { + messageBox.ShowResultMessage(result); + if (BusinessErrorCodes.ERROR_USER_ACCOUNT_DEMO == result) + BindDomainNames(); + return; + } + + // rebind domains + BindDomainNames(); + } + catch (Exception ex) + { + ShowErrorMessage("EXCHANGE_SET_DEFAULT_DOMAIN", ex); + } + } + + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/EnterpriseStorageSpaces.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/EnterpriseStorageSpaces.ascx.designer.cs new file mode 100644 index 00000000..d78f5ca8 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/EnterpriseStorageSpaces.ascx.designer.cs @@ -0,0 +1,105 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace WebsitePanel.Portal.ExchangeServer { + + + public partial class EnterpriseStorageSpaces { + + /// + /// asyncTasks control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks; + + /// + /// breadcrumb control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Breadcrumb breadcrumb; + + /// + /// menu control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.ExchangeServer.UserControls.Menu menu; + + /// + /// Image1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Image Image1; + + /// + /// locTitle control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Localize locTitle; + + /// + /// messageBox control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox; + + /// + /// btnAddSpace control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button btnAddSpace; + + /// + /// gvSpaces control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.GridView gvSpaces; + + /// + /// locQuota control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Localize locQuota; + + /// + /// spacesQuota control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.QuotaViewer spacesQuota; + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/App_LocalResources/Menu.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/App_LocalResources/Menu.ascx.resx index aac6db39..33a5df4a 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/App_LocalResources/Menu.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/App_LocalResources/Menu.ascx.resx @@ -148,7 +148,7 @@ Mailboxes - Organization's + Organization CRM @@ -204,4 +204,10 @@ Groups + + Enterprise Storage + + + Spaces + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/Menu.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/Menu.ascx.cs index 639a8fed..4fa2b70e 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/Menu.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/Menu.ascx.cs @@ -249,6 +249,17 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls groups.Add(lyncGroup); } + private void PrepareEnterpriseStorageMenu(PackageContext cntx, List groups, string imagePath) + { + MenuGroup enterpriseStorageGroup = + new MenuGroup(GetLocalizedString("Text.EnterpriseStorageGroup"), imagePath + "spaces16.png"); + + enterpriseStorageGroup.MenuItems.Add(CreateMenuItem("EnterpriseStorageSpaces", "enterprisestorage_spaces")); + + groups.Add(enterpriseStorageGroup); + } + + private List PrepareMenu() { PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId); @@ -289,6 +300,11 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls if (cntx.Groups.ContainsKey(ResourceGroups.Lync)) PrepareLyncMenu(cntx, groups, imagePath); + //EnterpriseStorage Menu + if (cntx.Groups.ContainsKey(ResourceGroups.EnterpriseStorage)) + PrepareEnterpriseStorageMenu(cntx, groups, imagePath); + + return groups; } diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj index 7cf454e4..62b14064 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj @@ -209,6 +209,13 @@ + + EnterpriseStorageSpaces.ascx + ASPXCodeBehind + + + EnterpriseStorageSpaces.ascx + OrganizationSecurityGroupMemberOf.ascx ASPXCodeBehind @@ -411,6 +418,7 @@ EnterpriseStorage_Settings.ascx + ASPXCodeBehind EnterpriseStorage_Settings.ascx @@ -3986,6 +3994,7 @@ + @@ -5216,6 +5225,9 @@ Designer + + Designer + Designer diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/WebsitePanel.WebPortal.csproj b/WebsitePanel/Sources/WebsitePanel.WebPortal/WebsitePanel.WebPortal.csproj index d4f55c36..c5ae723d 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/WebsitePanel.WebPortal.csproj +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/WebsitePanel.WebPortal.csproj @@ -120,6 +120,8 @@ + +