diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Modules.config b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Modules.config
index 7d629900..751c3884 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Modules.config
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Modules.config
@@ -54,7 +54,12 @@
-
+
+
+
+
+
+
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Pages.config b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Pages.config
index 9dd556ee..cca4b918 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Pages.config
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Pages.config
@@ -38,6 +38,7 @@
+
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_Modules.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_Modules.ascx.resx
index 2a1aabc9..b408a42b 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_Modules.ascx.resx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_Modules.ascx.resx
@@ -786,4 +786,7 @@
Phone Numbers
+
+ Hosted Organization
+
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/UserOrganization.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/UserOrganization.ascx.resx
new file mode 100644
index 00000000..585341ab
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/UserOrganization.ascx.resx
@@ -0,0 +1,252 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 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
+
+
+ Creation Date
+
+
+ Hosting Plan
+
+
+ Name
+
+
+ Pricing
+
+
+ Server
+
+
+ Status
+
+
+ Switch to this Space
+
+
+ ActiveSync Policy
+
+
+ BlackBerry
+
+
+ BlackBerry Users
+
+
+ Contacts
+
+
+ CRM 2013
+
+
+ CRM
+
+
+ CRM Organization
+
+
+ CRM Users
+
+
+ Disclaimers
+
+
+ Distribution Lists
+
+
+ Domains
+
+
+ Drive Maps
+
+
+ Folders
+
+
+ Enterprise Storage
+
+
+ Accepted Domains
+
+
+ Exchange
+
+
+ Lync Federation Domains
+
+
+ Lync
+
+
+ Phone Numbers
+
+
+ Lync User Plans
+
+
+ Lync Users
+
+
+ Mailboxes
+
+
+ Mailbox Plans
+
+
+ OCS
+
+
+ OCS Users
+
+
+ Organization
+
+
+ Organization Home
+
+
+ Public Folders
+
+
+ Retention Policy
+
+
+ Retention Policy Tag
+
+
+ Groups
+
+
+ Setup
+
+
+ SharePoint
+
+
+ Site Collections
+
+
+ Storage Settings
+
+
+ Storage Usage
+
+
+ Users
+
+
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/OrganizationMenu.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/OrganizationMenu.ascx.cs
index acb67ad5..2d9d4e6f 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/OrganizationMenu.ascx.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/OrganizationMenu.ascx.cs
@@ -31,16 +31,20 @@ using System.Web.UI.WebControls;
using WebsitePanel.EnterpriseServer;
using WebsitePanel.WebPortal;
+using WebsitePanel.Portal.UserControls;
namespace WebsitePanel.Portal
{
- public partial class OrganizationMenu : WebsitePanelModuleBase
+ public partial class OrganizationMenu : OrganizationMenuControl
{
private const string PID_SPACE_EXCHANGE_SERVER = "SpaceExchangeServer";
protected void Page_Load(object sender, EventArgs e)
{
+ ShortMenu = false;
+ ShowImg = false;
+
// organization
bool orgVisible = (PanelRequest.ItemID > 0 && Request[DefaultPage.PAGE_ID_PARAM].Equals(PID_SPACE_EXCHANGE_SERVER, StringComparison.InvariantCultureIgnoreCase));
@@ -53,331 +57,18 @@ namespace WebsitePanel.Portal
menu.Items.Add(rootItem);
+ //Add "Organization Home" menu item
+ MenuItem item = new MenuItem(
+ GetLocalizedString("Text.OrganizationHome"),
+ "",
+ "",
+ PortalUtils.EditUrl("ItemID", PanelRequest.ItemID.ToString(), "organization_home", "SpaceID=" + PanelSecurity.PackageId));
+
+ rootItem.ChildItems.Add(item);
+
BindMenu(rootItem.ChildItems);
}
}
- private void BindMenu(MenuItemCollection items)
- {
- PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
-
- string imagePath = String.Concat("~/", DefaultPage.THEMES_FOLDER, "/", Page.Theme, "/", "Images/Exchange", "/");
-
- //Add "Organization Home" menu item
- MenuItem item = new MenuItem(
- GetLocalizedString("Text.OrganizationHome"),
- "",
- "",
- PortalUtils.EditUrl("ItemID", PanelRequest.ItemID.ToString(), "organization_home", "SpaceID=" + PanelSecurity.PackageId));
-
- items.Add(item);
-
- //Organization menu group;
- if (cntx.Groups.ContainsKey(ResourceGroups.HostedOrganizations))
- PrepareOrganizationMenuRoot(cntx, items, imagePath);
-
- //Exchange menu group;
- if (cntx.Groups.ContainsKey(ResourceGroups.Exchange))
- PrepareExchangeMenuRoot(cntx, items, imagePath);
-
- //BlackBerry Menu
- if (cntx.Groups.ContainsKey(ResourceGroups.BlackBerry))
- PrepareBlackBerryMenuRoot(cntx, items, imagePath);
-
- //SharePoint menu group;
- if (cntx.Groups.ContainsKey(ResourceGroups.HostedSharePoint))
- PrepareSharePointMenuRoot(cntx, items, imagePath);
-
- //CRM Menu
- if (cntx.Groups.ContainsKey(ResourceGroups.HostedCRM2013))
- PrepareCRM2013MenuRoot(cntx, items, imagePath);
- else if (cntx.Groups.ContainsKey(ResourceGroups.HostedCRM))
- PrepareCRMMenuRoot(cntx, items, imagePath);
-
- //OCS Menu
- if (cntx.Groups.ContainsKey(ResourceGroups.OCS))
- PrepareOCSMenuRoot(cntx, items, imagePath);
-
- //Lync Menu
- if (cntx.Groups.ContainsKey(ResourceGroups.Lync))
- PrepareLyncMenuRoot(cntx, items, imagePath);
-
- //EnterpriseStorage Menu
- if (cntx.Groups.ContainsKey(ResourceGroups.EnterpriseStorage))
- PrepareEnterpriseStorageMenuRoot(cntx, items, imagePath);
- }
-
- private void PrepareOrganizationMenuRoot(PackageContext cntx, MenuItemCollection items, string imagePath)
- {
- bool hideItems = false;
-
- UserInfo user = UsersHelper.GetUser(PanelSecurity.EffectiveUserId);
-
- if (user != null)
- {
- if ((user.Role == UserRole.User) & (Utils.CheckQouta(Quotas.EXCHANGE2007_ISCONSUMER, cntx)))
- hideItems = true;
- }
-
- if (!hideItems)
- {
- MenuItem item = new MenuItem(GetLocalizedString("Text.OrganizationGroup"), "", "", null);
-
- item.Selectable = false;
-
- PrepareOrganizationMenu(cntx, item.ChildItems);
-
- if (item.ChildItems.Count > 0)
- {
- items.Add(item);
- }
- }
- }
-
- private void PrepareOrganizationMenu(PackageContext cntx, MenuItemCollection items)
- {
- if (Utils.CheckQouta(Quotas.EXCHANGE2007_MAILBOXES, cntx) == false)
- {
- if (Utils.CheckQouta(Quotas.ORGANIZATION_DOMAINS, cntx))
- items.Add(CreateMenuItem("DomainNames", "org_domains"));
- }
- if (Utils.CheckQouta(Quotas.ORGANIZATION_USERS, cntx))
- items.Add(CreateMenuItem("Users", "users"));
-
- if (Utils.CheckQouta(Quotas.ORGANIZATION_SECURITYGROUPS, cntx))
- items.Add(CreateMenuItem("SecurityGroups", "secur_groups"));
- }
-
- private void PrepareExchangeMenuRoot(PackageContext cntx, MenuItemCollection items, string imagePath)
- {
- bool hideItems = false;
-
- UserInfo user = UsersHelper.GetUser(PanelSecurity.EffectiveUserId);
-
- if (user != null)
- {
- if ((user.Role == UserRole.User) & (Utils.CheckQouta(Quotas.EXCHANGE2007_ISCONSUMER, cntx)))
- hideItems = true;
- }
-
- MenuItem item = new MenuItem(GetLocalizedString("Text.ExchangeGroup"), "", "", null);
-
- item.Selectable = false;
-
- PrepareExchangeMenu(cntx, item.ChildItems, hideItems);
-
- if (item.ChildItems.Count > 0)
- {
- items.Add(item);
- }
- }
-
- private void PrepareExchangeMenu(PackageContext cntx, MenuItemCollection exchangeItems, bool hideItems)
- {
- if (Utils.CheckQouta(Quotas.EXCHANGE2007_MAILBOXES, cntx))
- exchangeItems.Add(CreateMenuItem("Mailboxes", "mailboxes"));
-
- if (Utils.CheckQouta(Quotas.EXCHANGE2007_CONTACTS, cntx))
- exchangeItems.Add(CreateMenuItem("Contacts", "contacts"));
-
- if (Utils.CheckQouta(Quotas.EXCHANGE2007_DISTRIBUTIONLISTS, cntx))
- exchangeItems.Add(CreateMenuItem("DistributionLists", "dlists"));
-
- if (Utils.CheckQouta(Quotas.EXCHANGE2007_PUBLICFOLDERS, cntx))
- exchangeItems.Add(CreateMenuItem("PublicFolders", "public_folders"));
-
- if (!hideItems)
- if (Utils.CheckQouta(Quotas.EXCHANGE2007_ACTIVESYNCALLOWED, cntx))
- exchangeItems.Add(CreateMenuItem("ActiveSyncPolicy", "activesync_policy"));
-
- if (!hideItems)
- if (Utils.CheckQouta(Quotas.EXCHANGE2007_MAILBOXES, cntx))
- exchangeItems.Add(CreateMenuItem("MailboxPlans", "mailboxplans"));
-
- if (!hideItems)
- if (Utils.CheckQouta(Quotas.EXCHANGE2013_ALLOWRETENTIONPOLICY, cntx))
- exchangeItems.Add(CreateMenuItem("RetentionPolicy", "retentionpolicy"));
-
- if (!hideItems)
- if (Utils.CheckQouta(Quotas.EXCHANGE2013_ALLOWRETENTIONPOLICY, cntx))
- exchangeItems.Add(CreateMenuItem("RetentionPolicyTag", "retentionpolicytag"));
-
- if (!hideItems)
- if (Utils.CheckQouta(Quotas.EXCHANGE2007_MAILBOXES, cntx))
- exchangeItems.Add(CreateMenuItem("ExchangeDomainNames", "domains"));
-
- if (!hideItems)
- if (Utils.CheckQouta(Quotas.EXCHANGE2007_MAILBOXES, cntx))
- exchangeItems.Add(CreateMenuItem("StorageUsage", "storage_usage"));
-
- if (!hideItems)
- if (Utils.CheckQouta(Quotas.EXCHANGE2007_DISCLAIMERSALLOWED, cntx))
- exchangeItems.Add(CreateMenuItem("Disclaimers", "disclaimers"));
-
- }
-
- private void PrepareCRMMenuRoot(PackageContext cntx, MenuItemCollection items, string imagePath)
- {
- MenuItem item = new MenuItem(GetLocalizedString("Text.CRMGroup"), "", "", null);
-
- item.Selectable = false;
-
- PrepareCRMMenu(cntx, item.ChildItems);
-
- if (item.ChildItems.Count > 0)
- {
- items.Add(item);
- }
- }
-
- private void PrepareCRMMenu(PackageContext cntx, MenuItemCollection crmItems)
- {
- crmItems.Add(CreateMenuItem("CRMOrganization", "CRMOrganizationDetails"));
- crmItems.Add(CreateMenuItem("CRMUsers", "CRMUsers"));
- crmItems.Add(CreateMenuItem("StorageLimits", "crm_storage_settings"));
- }
-
- private void PrepareCRM2013MenuRoot(PackageContext cntx, MenuItemCollection items, string imagePath)
- {
- MenuItem item = new MenuItem(GetLocalizedString("Text.CRM2013Group"), "", "", null);
-
- item.Selectable = false;
-
- PrepareCRM2013Menu(cntx, item.ChildItems);
-
- if (item.ChildItems.Count > 0)
- {
- items.Add(item);
- }
- }
-
- private void PrepareCRM2013Menu(PackageContext cntx, MenuItemCollection crmItems)
- {
- crmItems.Add(CreateMenuItem("CRMOrganization", "CRMOrganizationDetails"));
- crmItems.Add(CreateMenuItem("CRMUsers", "CRMUsers"));
- crmItems.Add(CreateMenuItem("StorageLimits", "crm_storage_settings"));
- }
-
- private void PrepareBlackBerryMenuRoot(PackageContext cntx, MenuItemCollection items, string imagePath)
- {
- MenuItem item = new MenuItem(GetLocalizedString("Text.BlackBerryGroup"), "", "", null);
-
- item.Selectable = false;
-
- PrepareBlackBerryMenu(cntx, item.ChildItems);
-
- if (item.ChildItems.Count > 0)
- {
- items.Add(item);
- }
-
- }
-
- private void PrepareBlackBerryMenu(PackageContext cntx, MenuItemCollection bbItems)
- {
- bbItems.Add(CreateMenuItem("BlackBerryUsers", "blackberry_users"));
- }
-
- private void PrepareSharePointMenuRoot(PackageContext cntx, MenuItemCollection items, string imagePath)
- {
- MenuItem item = new MenuItem(GetLocalizedString("Text.SharePointGroup"), "", "", null);
-
- item.Selectable = false;
-
- PrepareSharePointMenu(cntx, item.ChildItems);
-
- if (item.ChildItems.Count > 0)
- {
- items.Add(item);
- }
- }
-
- private void PrepareSharePointMenu(PackageContext cntx, MenuItemCollection spItems)
- {
- spItems.Add(CreateMenuItem("SiteCollections", "sharepoint_sitecollections"));
- spItems.Add(CreateMenuItem("StorageUsage", "sharepoint_storage_usage"));
- spItems.Add(CreateMenuItem("StorageLimits", "sharepoint_storage_settings"));
- }
-
- private void PrepareOCSMenuRoot(PackageContext cntx, MenuItemCollection items, string imagePath)
- {
- MenuItem item = new MenuItem(GetLocalizedString("Text.OCSGroup"), "", "", null);
-
- item.Selectable = false;
-
- PrepareOCSMenu(cntx, item.ChildItems);
-
- if (item.ChildItems.Count > 0)
- {
- items.Add(item);
- }
- }
-
- private void PrepareOCSMenu(PackageContext cntx, MenuItemCollection osItems)
- {
- osItems.Add(CreateMenuItem("OCSUsers", "ocs_users"));
- }
-
- private void PrepareLyncMenuRoot(PackageContext cntx, MenuItemCollection items, string imagePath)
- {
- MenuItem item = new MenuItem(GetLocalizedString("Text.LyncGroup"), "", "", null);
-
- item.Selectable = false;
-
- PrepareLyncMenu(cntx, item.ChildItems);
-
- if (item.ChildItems.Count > 0)
- {
- items.Add(item);
- }
- }
-
- private void PrepareLyncMenu(PackageContext cntx, MenuItemCollection lyncItems)
- {
- lyncItems.Add(CreateMenuItem("LyncUsers", "lync_users"));
-
- lyncItems.Add(CreateMenuItem("LyncUserPlans", "lync_userplans"));
-
-
- if (Utils.CheckQouta(Quotas.LYNC_FEDERATION, cntx))
- lyncItems.Add(CreateMenuItem("LyncFederationDomains", "lync_federationdomains"));
-
- if (Utils.CheckQouta(Quotas.LYNC_PHONE, cntx))
- lyncItems.Add(CreateMenuItem("LyncPhoneNumbers", "lync_phonenumbers"));
- }
-
- private void PrepareEnterpriseStorageMenuRoot(PackageContext cntx, MenuItemCollection items, string imagePath)
- {
- MenuItem item = new MenuItem(GetLocalizedString("Text.EnterpriseStorageGroup"), "", "", null);
-
- item.Selectable = false;
-
- PrepareEnterpriseStorageMenu(cntx, item.ChildItems);
-
- if (item.ChildItems.Count > 0)
- {
- items.Add(item);
- }
- }
-
- private void PrepareEnterpriseStorageMenu(PackageContext cntx, MenuItemCollection enterpriseStorageItems)
- {
- enterpriseStorageItems.Add(CreateMenuItem("EnterpriseStorageFolders", "enterprisestorage_folders"));
-
- if(Utils.CheckQouta(Quotas.ENTERPRICESTORAGE_DRIVEMAPS, cntx))
- enterpriseStorageItems.Add(CreateMenuItem("EnterpriseStorageDriveMaps", "enterprisestorage_drive_maps"));
-
- }
-
- private MenuItem CreateMenuItem(string text, string key)
- {
- MenuItem item = new MenuItem();
-
- item.Text = GetLocalizedString("Text." + text);
- item.NavigateUrl = PortalUtils.EditUrl("ItemID", PanelRequest.ItemID.ToString(), key,
- "SpaceID=" + PanelSecurity.PackageId);
-
- return item;
- }
}
}
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/OrganizationMenuControl.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/OrganizationMenuControl.cs
new file mode 100644
index 00000000..4d2e8c36
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/OrganizationMenuControl.cs
@@ -0,0 +1,480 @@
+// Copyright (c) 2014, 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.Data;
+using System.Configuration;
+using System.Collections;
+using System.Web;
+using System.Web.Security;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Web.UI.WebControls.WebParts;
+using System.Web.UI.HtmlControls;
+using WebsitePanel.EnterpriseServer;
+using System.Xml;
+using System.Collections.Generic;
+using WebsitePanel.WebPortal;
+
+namespace WebsitePanel.Portal.UserControls
+{
+ public class OrganizationMenuControl : WebsitePanelModuleBase
+ {
+
+ virtual public string ImagePath
+ {
+ get { return String.Concat("~/", DefaultPage.THEMES_FOLDER, "/", Page.Theme, "/"); }
+ }
+
+ virtual public int PackageId
+ {
+ get { return PanelSecurity.PackageId; }
+ }
+
+ virtual public int ItemID
+ {
+ get { return PanelRequest.ItemID; }
+ }
+
+
+ private PackageContext cntx = null;
+ virtual public PackageContext Cntx
+ {
+ get
+ {
+ if (cntx == null) cntx = PackagesHelper.GetCachedPackageContext(PackageId);
+ return cntx;
+ }
+ }
+
+ public bool ShortMenu = false;
+ public bool ShowImg = false;
+
+ public void BindMenu(MenuItemCollection items)
+ {
+ //Organization menu group;
+ if (Cntx.Groups.ContainsKey(ResourceGroups.HostedOrganizations))
+ PrepareOrganizationMenuRoot(items);
+
+ //Exchange menu group;
+ if (Cntx.Groups.ContainsKey(ResourceGroups.Exchange))
+ PrepareExchangeMenuRoot(items);
+
+ //BlackBerry Menu
+ if (Cntx.Groups.ContainsKey(ResourceGroups.BlackBerry))
+ PrepareBlackBerryMenuRoot(items);
+
+ //SharePoint menu group;
+ if (Cntx.Groups.ContainsKey(ResourceGroups.HostedSharePoint))
+ PrepareSharePointMenuRoot(items);
+
+ //CRM Menu
+ if (Cntx.Groups.ContainsKey(ResourceGroups.HostedCRM2013))
+ PrepareCRM2013MenuRoot(items);
+ else if (Cntx.Groups.ContainsKey(ResourceGroups.HostedCRM))
+ PrepareCRMMenuRoot(items);
+
+ //OCS Menu
+ if (Cntx.Groups.ContainsKey(ResourceGroups.OCS))
+ PrepareOCSMenuRoot(items);
+
+ //Lync Menu
+ if (Cntx.Groups.ContainsKey(ResourceGroups.Lync))
+ PrepareLyncMenuRoot(items);
+
+ //EnterpriseStorage Menu
+ if (Cntx.Groups.ContainsKey(ResourceGroups.EnterpriseStorage))
+ PrepareEnterpriseStorageMenuRoot(items);
+ }
+
+ private void PrepareOrganizationMenuRoot(MenuItemCollection items)
+ {
+ bool hideItems = false;
+
+ UserInfo user = UsersHelper.GetUser(PanelSecurity.EffectiveUserId);
+
+ if (user != null)
+ {
+ if ((user.Role == UserRole.User) & (Utils.CheckQouta(Quotas.EXCHANGE2007_ISCONSUMER, Cntx)))
+ hideItems = true;
+ }
+
+ if (!hideItems)
+ {
+ if (ShortMenu)
+ {
+ PrepareOrganizationMenu(items);
+ }
+ else
+ {
+ MenuItem item = new MenuItem(GetLocalizedString("Text.OrganizationGroup"), "", "", null);
+
+ item.Selectable = false;
+
+ PrepareOrganizationMenu(item.ChildItems);
+
+ if (item.ChildItems.Count > 0)
+ {
+ items.Add(item);
+ }
+ }
+ }
+ }
+
+ private void PrepareOrganizationMenu(MenuItemCollection items)
+ {
+ if (Utils.CheckQouta(Quotas.EXCHANGE2007_MAILBOXES, Cntx) == false)
+ {
+ if (Utils.CheckQouta(Quotas.ORGANIZATION_DOMAINS, Cntx))
+ items.Add(CreateMenuItem("DomainNames", "org_domains"));
+ }
+ if (Utils.CheckQouta(Quotas.ORGANIZATION_USERS, Cntx))
+ items.Add(CreateMenuItem("Users", "users", @"Icons/user_48.png"));
+
+ if (Utils.CheckQouta(Quotas.ORGANIZATION_SECURITYGROUPS, Cntx))
+ items.Add(CreateMenuItem("SecurityGroups", "secur_groups", @"Icons/group_48.png"));
+ }
+
+ private void PrepareExchangeMenuRoot(MenuItemCollection items)
+ {
+ bool hideItems = false;
+
+ UserInfo user = UsersHelper.GetUser(PanelSecurity.EffectiveUserId);
+
+ if (user != null)
+ {
+ if ((user.Role == UserRole.User) & (Utils.CheckQouta(Quotas.EXCHANGE2007_ISCONSUMER, Cntx)))
+ hideItems = true;
+ }
+
+ if (ShortMenu)
+ {
+ PrepareExchangeMenu(items, hideItems);
+ }
+ else
+ {
+ MenuItem item = new MenuItem(GetLocalizedString("Text.ExchangeGroup"), "", "", null);
+
+ item.Selectable = false;
+
+ PrepareExchangeMenu(item.ChildItems, hideItems);
+
+ if (item.ChildItems.Count > 0)
+ {
+ items.Add(item);
+ }
+ }
+ }
+
+ private void PrepareExchangeMenu(MenuItemCollection exchangeItems, bool hideItems)
+ {
+ if (Utils.CheckQouta(Quotas.EXCHANGE2007_MAILBOXES, Cntx))
+ exchangeItems.Add(CreateMenuItem("Mailboxes", "mailboxes", @"Icons/accounting_mail_48.png"));
+
+ if (ShortMenu) return;
+
+ if (Utils.CheckQouta(Quotas.EXCHANGE2007_CONTACTS, Cntx))
+ exchangeItems.Add(CreateMenuItem("Contacts", "contacts"));
+
+ if (Utils.CheckQouta(Quotas.EXCHANGE2007_DISTRIBUTIONLISTS, Cntx))
+ exchangeItems.Add(CreateMenuItem("DistributionLists", "dlists"));
+
+ if (Utils.CheckQouta(Quotas.EXCHANGE2007_PUBLICFOLDERS, Cntx))
+ exchangeItems.Add(CreateMenuItem("PublicFolders", "public_folders"));
+
+ if (!hideItems)
+ if (Utils.CheckQouta(Quotas.EXCHANGE2007_ACTIVESYNCALLOWED, Cntx))
+ exchangeItems.Add(CreateMenuItem("ActiveSyncPolicy", "activesync_policy"));
+
+ if (!hideItems)
+ if (Utils.CheckQouta(Quotas.EXCHANGE2007_MAILBOXES, Cntx))
+ exchangeItems.Add(CreateMenuItem("MailboxPlans", "mailboxplans"));
+
+ if (!hideItems)
+ if (Utils.CheckQouta(Quotas.EXCHANGE2013_ALLOWRETENTIONPOLICY, Cntx))
+ exchangeItems.Add(CreateMenuItem("RetentionPolicy", "retentionpolicy"));
+
+ if (!hideItems)
+ if (Utils.CheckQouta(Quotas.EXCHANGE2013_ALLOWRETENTIONPOLICY, Cntx))
+ exchangeItems.Add(CreateMenuItem("RetentionPolicyTag", "retentionpolicytag"));
+
+ if (!hideItems)
+ if (Utils.CheckQouta(Quotas.EXCHANGE2007_MAILBOXES, Cntx))
+ exchangeItems.Add(CreateMenuItem("ExchangeDomainNames", "domains"));
+
+ if (!hideItems)
+ if (Utils.CheckQouta(Quotas.EXCHANGE2007_MAILBOXES, Cntx))
+ exchangeItems.Add(CreateMenuItem("StorageUsage", "storage_usage"));
+
+ if (!hideItems)
+ if (Utils.CheckQouta(Quotas.EXCHANGE2007_DISCLAIMERSALLOWED, Cntx))
+ exchangeItems.Add(CreateMenuItem("Disclaimers", "disclaimers"));
+
+ }
+
+ private void PrepareCRMMenuRoot(MenuItemCollection items)
+ {
+ if (ShortMenu)
+ {
+ PrepareCRMMenu(items);
+ }
+ else
+ {
+ MenuItem item = new MenuItem(GetLocalizedString("Text.CRMGroup"), "", "", null);
+
+ item.Selectable = false;
+
+ PrepareCRMMenu(item.ChildItems);
+
+ if (item.ChildItems.Count > 0)
+ {
+ items.Add(item);
+ }
+ }
+ }
+
+ private void PrepareCRMMenu(MenuItemCollection crmItems)
+ {
+ crmItems.Add(CreateMenuItem("CRMOrganization", "CRMOrganizationDetails", @"Images/crm_48.png"));
+ crmItems.Add(CreateMenuItem("CRMUsers", "CRMUsers", @"Images/crm_48.png"));
+
+ if (ShortMenu) return;
+
+ crmItems.Add(CreateMenuItem("StorageLimits", "crm_storage_settings"));
+ }
+
+ private void PrepareCRM2013MenuRoot(MenuItemCollection items)
+ {
+ if (ShortMenu)
+ {
+ PrepareCRM2013Menu(items);
+ }
+ else
+ {
+ MenuItem item = new MenuItem(GetLocalizedString("Text.CRM2013Group"), "", "", null);
+
+ item.Selectable = false;
+
+ PrepareCRM2013Menu(item.ChildItems);
+
+ if (item.ChildItems.Count > 0)
+ {
+ items.Add(item);
+ }
+ }
+ }
+
+ private void PrepareCRM2013Menu(MenuItemCollection crmItems)
+ {
+ crmItems.Add(CreateMenuItem("CRMOrganization", "CRMOrganizationDetails", @"Images/crm_48.png"));
+ crmItems.Add(CreateMenuItem("CRMUsers", "CRMUsers", @"Images/crm_48.png"));
+
+ if (ShortMenu) return;
+
+ crmItems.Add(CreateMenuItem("StorageLimits", "crm_storage_settings"));
+ }
+
+ private void PrepareBlackBerryMenuRoot(MenuItemCollection items)
+ {
+ if (ShortMenu)
+ {
+ PrepareBlackBerryMenu(items);
+ }
+ else
+ {
+ MenuItem item = new MenuItem(GetLocalizedString("Text.BlackBerryGroup"), "", "", null);
+
+ item.Selectable = false;
+
+ PrepareBlackBerryMenu(item.ChildItems);
+
+ if (item.ChildItems.Count > 0)
+ {
+ items.Add(item);
+ }
+ }
+
+ }
+
+ private void PrepareBlackBerryMenu(MenuItemCollection bbItems)
+ {
+ bbItems.Add(CreateMenuItem("BlackBerryUsers", "blackberry_users", @"Images/blackberry48.png"));
+ }
+
+ private void PrepareSharePointMenuRoot(MenuItemCollection items)
+ {
+ if (ShortMenu)
+ {
+ PrepareSharePointMenu(items);
+ }
+ else
+ {
+ MenuItem item = new MenuItem(GetLocalizedString("Text.SharePointGroup"), "", "", null);
+
+ item.Selectable = false;
+
+ PrepareSharePointMenu(item.ChildItems);
+
+ if (item.ChildItems.Count > 0)
+ {
+ items.Add(item);
+ }
+ }
+ }
+
+ private void PrepareSharePointMenu(MenuItemCollection spItems)
+ {
+ spItems.Add(CreateMenuItem("SiteCollections", "sharepoint_sitecollections", @"Images/Exchange/storage_limits_48.png"));
+
+ if (ShortMenu) return;
+
+ spItems.Add(CreateMenuItem("StorageUsage", "sharepoint_storage_usage"));
+ spItems.Add(CreateMenuItem("StorageLimits", "sharepoint_storage_settings"));
+ }
+
+ private void PrepareOCSMenuRoot(MenuItemCollection items)
+ {
+ if (ShortMenu)
+ {
+ PrepareOCSMenu(items);
+ }
+ else
+ {
+ MenuItem item = new MenuItem(GetLocalizedString("Text.OCSGroup"), "", "", null);
+
+ item.Selectable = false;
+
+ PrepareOCSMenu(item.ChildItems);
+
+ if (item.ChildItems.Count > 0)
+ {
+ items.Add(item);
+ }
+ }
+ }
+
+ private void PrepareOCSMenu(MenuItemCollection osItems)
+ {
+ osItems.Add(CreateMenuItem("OCSUsers", "ocs_users"));
+ }
+
+ private void PrepareLyncMenuRoot(MenuItemCollection items)
+ {
+ if (ShortMenu)
+ {
+ PrepareLyncMenu(items);
+ }
+ else
+ {
+ MenuItem item = new MenuItem(GetLocalizedString("Text.LyncGroup"), "", "", null);
+
+ item.Selectable = false;
+
+ PrepareLyncMenu(item.ChildItems);
+
+ if (item.ChildItems.Count > 0)
+ {
+ items.Add(item);
+ }
+ }
+ }
+
+ private void PrepareLyncMenu(MenuItemCollection lyncItems)
+ {
+ lyncItems.Add(CreateMenuItem("LyncUsers", "lync_users", @"Images/lync48.png"));
+
+ if (ShortMenu) return;
+
+ lyncItems.Add(CreateMenuItem("LyncUserPlans", "lync_userplans"));
+
+
+ if (Utils.CheckQouta(Quotas.LYNC_FEDERATION, Cntx))
+ lyncItems.Add(CreateMenuItem("LyncFederationDomains", "lync_federationdomains"));
+
+ if (Utils.CheckQouta(Quotas.LYNC_PHONE, Cntx))
+ lyncItems.Add(CreateMenuItem("LyncPhoneNumbers", "lync_phonenumbers"));
+ }
+
+ private void PrepareEnterpriseStorageMenuRoot(MenuItemCollection items)
+ {
+ if (ShortMenu)
+ {
+ PrepareEnterpriseStorageMenu(items);
+ }
+ else
+ {
+ MenuItem item = new MenuItem(GetLocalizedString("Text.EnterpriseStorageGroup"), "", "", null);
+
+ item.Selectable = false;
+
+ PrepareEnterpriseStorageMenu(item.ChildItems);
+
+ if (item.ChildItems.Count > 0)
+ {
+ items.Add(item);
+ }
+ }
+ }
+
+ private void PrepareEnterpriseStorageMenu(MenuItemCollection enterpriseStorageItems)
+ {
+ enterpriseStorageItems.Add(CreateMenuItem("EnterpriseStorageFolders", "enterprisestorage_folders", @"Images/folder_48.png"));
+
+ if (ShortMenu) return;
+
+ if (Utils.CheckQouta(Quotas.ENTERPRICESTORAGE_DRIVEMAPS, Cntx))
+ enterpriseStorageItems.Add(CreateMenuItem("EnterpriseStorageDriveMaps", "enterprisestorage_drive_maps"));
+
+ }
+
+ private MenuItem CreateMenuItem(string text, string key)
+ {
+ return CreateMenuItem(text, key, null);
+ }
+
+ private MenuItem CreateMenuItem(string text, string key, string img)
+ {
+ MenuItem item = new MenuItem();
+
+ item.Text = GetLocalizedString("Text." + text);
+ item.NavigateUrl = PortalUtils.EditUrl("ItemID", ItemID.ToString(), key,
+ "SpaceID=" + PackageId);
+
+ if (ShowImg)
+ {
+ if (img==null)
+ item.ImageUrl = ImagePath + "Icons/tool_48.png";
+ else
+ item.ImageUrl = ImagePath + img;
+ }
+
+ return item;
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserOrganization.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserOrganization.ascx
new file mode 100644
index 00000000..84547d05
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserOrganization.ascx
@@ -0,0 +1,20 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UserOrganization.ascx.cs" Inherits="WebsitePanel.Portal.UserOrganization" %>
+<%@ Import Namespace="WebsitePanel.Portal" %>
+<%@ Register Src="UserControls/ServerDetails.ascx" TagName="ServerDetails" TagPrefix="uc3" %>
+<%@ Register Src="UserControls/Comments.ascx" TagName="Comments" TagPrefix="uc4" %>
+<%@ Import Namespace="WebsitePanel.Portal" %>
+
+
+
+
+
+
+
+
+ <%# Eval("Text") %>
+
+
+
+
+
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserOrganization.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserOrganization.ascx.cs
new file mode 100644
index 00000000..5ccdbc57
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserOrganization.ascx.cs
@@ -0,0 +1,132 @@
+// Copyright (c) 2014, 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.Data;
+using System.Configuration;
+using System.Collections;
+using System.Collections.Generic;
+using System.Web;
+using System.Web.Security;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Web.UI.WebControls.WebParts;
+using System.Web.UI.HtmlControls;
+using System.Xml;
+
+using WebsitePanel.EnterpriseServer;
+using WebsitePanel.WebPortal;
+using WebsitePanel.Portal.UserControls;
+
+
+namespace WebsitePanel.Portal
+{
+ public partial class UserOrganization : OrganizationMenuControl
+ {
+ private void FindDefaultOrg()
+ {
+ DataSet rawPackages = new PackagesHelper().GetMyPackages();
+ if (rawPackages.Tables.Count<1) return;
+
+ DataTable packages = rawPackages.Tables[0];
+
+ for(int i=0;i 0)
+ {
+ MenuItemCollection items = new MenuItemCollection();
+
+ BindMenu(items);
+ UserOrgPanel.Visible = true;
+
+ OrgIcons.DataSource = items;
+ OrgIcons.DataBind();
+ }
+ else
+ UserOrgPanel.Visible = false;
+
+ }
+
+
+ }
+}
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserOrganization.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserOrganization.ascx.designer.cs
new file mode 100644
index 00000000..26efff9f
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserOrganization.ascx.designer.cs
@@ -0,0 +1,33 @@
+//------------------------------------------------------------------------------
+//
+// 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 {
+
+
+ public partial class UserOrganization {
+
+ ///
+ /// UserOrgPanel control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Panel UserOrgPanel;
+
+ ///
+ /// OrgIcons control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.DataList OrgIcons;
+ }
+}
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 84a7a6bc..60e9bcef 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj
@@ -602,6 +602,9 @@
EditFeedsList.ascx
+
+ ASPXCodeBehind
+
OrgIdPolicyEditor.ascx
ASPXCodeBehind
@@ -630,6 +633,13 @@
AllocatePackagePhoneNumbers.ascx
+
+ UserOrganization.ascx
+ ASPXCodeBehind
+
+
+ UserOrganization.ascx
+
MonitoringPage.aspx
ASPXCodeBehind
@@ -4147,6 +4157,7 @@
+
@@ -5354,6 +5365,9 @@
Designer
+
+ Designer
+
Designer