Fixed issue where peer account cannot create a mailbox
OrganizatioHome adaptive for contacts, list, folder (if 0 dont show) Hosted Organization for consumers menu updated to show only essential items for peers Create Mailbox for consumers adjusted not to create room or equipment mbx Appearance of demo account check boxes optional by putting <HideDemoCheckbox>true</HideDemoCheckbox> in SiteSettings.config
This commit is contained in:
parent
02c59802db
commit
b47c96bad5
11 changed files with 144 additions and 40 deletions
|
@ -20957,9 +20957,6 @@ CREATE PROCEDURE [dbo].[GetPackages]
|
||||||
)
|
)
|
||||||
AS
|
AS
|
||||||
|
|
||||||
IF dbo.CheckActorUserRights(@ActorID, @UserID) = 0
|
|
||||||
RAISERROR('You are not allowed to access this account', 16, 1)
|
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
P.PackageID,
|
P.PackageID,
|
||||||
P.ParentPackageID,
|
P.ParentPackageID,
|
||||||
|
|
|
@ -5184,3 +5184,50 @@ END
|
||||||
|
|
||||||
DROP TABLE #TempBlackBerryUsers
|
DROP TABLE #TempBlackBerryUsers
|
||||||
GO
|
GO
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ALTER PROCEDURE [dbo].[GetPackages]
|
||||||
|
(
|
||||||
|
@ActorID int,
|
||||||
|
@UserID int
|
||||||
|
)
|
||||||
|
AS
|
||||||
|
|
||||||
|
SELECT
|
||||||
|
P.PackageID,
|
||||||
|
P.ParentPackageID,
|
||||||
|
P.PackageName,
|
||||||
|
P.StatusID,
|
||||||
|
P.PurchaseDate,
|
||||||
|
|
||||||
|
-- server
|
||||||
|
ISNULL(P.ServerID, 0) AS ServerID,
|
||||||
|
ISNULL(S.ServerName, 'None') AS ServerName,
|
||||||
|
ISNULL(S.Comments, '') AS ServerComments,
|
||||||
|
ISNULL(S.VirtualServer, 1) AS VirtualServer,
|
||||||
|
|
||||||
|
-- hosting plan
|
||||||
|
P.PlanID,
|
||||||
|
HP.PlanName,
|
||||||
|
|
||||||
|
-- user
|
||||||
|
P.UserID,
|
||||||
|
U.Username,
|
||||||
|
U.FirstName,
|
||||||
|
U.LastName,
|
||||||
|
U.RoleID,
|
||||||
|
U.Email
|
||||||
|
FROM Packages AS P
|
||||||
|
INNER JOIN Users AS U ON P.UserID = U.UserID
|
||||||
|
INNER JOIN Servers AS S ON P.ServerID = S.ServerID
|
||||||
|
INNER JOIN HostingPlans AS HP ON P.PlanID = HP.PlanID
|
||||||
|
WHERE
|
||||||
|
P.UserID = @UserID
|
||||||
|
RETURN
|
||||||
|
GO
|
|
@ -121,8 +121,6 @@
|
||||||
<td>
|
<td>
|
||||||
<asp:RadioButtonList ID="rbMailboxType" runat="server">
|
<asp:RadioButtonList ID="rbMailboxType" runat="server">
|
||||||
<asp:ListItem Value="1" Selected="true" meta:resourcekey="UserMailbox">User mailbox</asp:ListItem>
|
<asp:ListItem Value="1" Selected="true" meta:resourcekey="UserMailbox">User mailbox</asp:ListItem>
|
||||||
<asp:ListItem Value="5" meta:resourcekey="RoomMailbox">Room mailbox</asp:ListItem>
|
|
||||||
<asp:ListItem Value="6" meta:resourcekey="EquipmentMailbox">Equipment mailbox</asp:ListItem>
|
|
||||||
</asp:RadioButtonList>
|
</asp:RadioButtonList>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -86,6 +86,8 @@ namespace WebsitePanel.Portal.ExchangeServer
|
||||||
if (cntx.Quotas[Quotas.EXCHANGE2007_ISCONSUMER].QuotaAllocatedValue != 1)
|
if (cntx.Quotas[Quotas.EXCHANGE2007_ISCONSUMER].QuotaAllocatedValue != 1)
|
||||||
{
|
{
|
||||||
locSubscriberNumber.Visible = txtSubscriberNumber.Visible = valRequireSubscriberNumber.Enabled = false;
|
locSubscriberNumber.Visible = txtSubscriberNumber.Visible = valRequireSubscriberNumber.Enabled = false;
|
||||||
|
rbMailboxType.Items.Add(new System.Web.UI.WebControls.ListItem(GetLocalizedString("RoomMailbox"),"5"));
|
||||||
|
rbMailboxType.Items.Add(new System.Web.UI.WebControls.ListItem(GetLocalizedString("EquipmentMailbox"),"6"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -344,14 +344,5 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
||||||
/// To modify move field declaration from designer file to code-behind file.
|
/// To modify move field declaration from designer file to code-behind file.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::System.Web.UI.WebControls.ValidationSummary ValidationSummary1;
|
protected global::System.Web.UI.WebControls.ValidationSummary ValidationSummary1;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// FormComments 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 FormComments;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,7 +86,7 @@
|
||||||
<wsp:QuotaViewer ID="mailboxesStats" QuotaTypeId="2" runat="server" DisplayGauge="true" />
|
<wsp:QuotaViewer ID="mailboxesStats" QuotaTypeId="2" runat="server" DisplayGauge="true" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="OrgStatsRow">
|
<tr class="OrgStatsRow" id="rowContacts" runat="server">
|
||||||
<td align="right" nowrap>
|
<td align="right" nowrap>
|
||||||
<asp:HyperLink ID="lnkContacts" runat="server" meta:resourcekey="lnkContacts"></asp:HyperLink>
|
<asp:HyperLink ID="lnkContacts" runat="server" meta:resourcekey="lnkContacts"></asp:HyperLink>
|
||||||
</td>
|
</td>
|
||||||
|
@ -94,7 +94,7 @@
|
||||||
<wsp:QuotaViewer ID="contactsStats" QuotaTypeId="2" runat="server" DisplayGauge="true" />
|
<wsp:QuotaViewer ID="contactsStats" QuotaTypeId="2" runat="server" DisplayGauge="true" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="OrgStatsRow">
|
<tr class="OrgStatsRow" id="rowLists" runat="server">
|
||||||
<td align="right" nowrap>
|
<td align="right" nowrap>
|
||||||
<asp:HyperLink ID="lnkLists" runat="server" meta:resourcekey="lnkLists"></asp:HyperLink>
|
<asp:HyperLink ID="lnkLists" runat="server" meta:resourcekey="lnkLists"></asp:HyperLink>
|
||||||
</td>
|
</td>
|
||||||
|
@ -102,7 +102,7 @@
|
||||||
<wsp:QuotaViewer ID="listsStats" QuotaTypeId="2" runat="server" DisplayGauge="true" />
|
<wsp:QuotaViewer ID="listsStats" QuotaTypeId="2" runat="server" DisplayGauge="true" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="OrgStatsRow" >
|
<tr class="OrgStatsRow" id="rowFolders" runat="server">
|
||||||
<td align="right" nowrap>
|
<td align="right" nowrap>
|
||||||
<asp:HyperLink ID="lnkFolders" runat="server" meta:resourcekey="lnkFolders"></asp:HyperLink>
|
<asp:HyperLink ID="lnkFolders" runat="server" meta:resourcekey="lnkFolders"></asp:HyperLink>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -67,21 +67,34 @@ namespace WebsitePanel.Portal.ExchangeServer
|
||||||
mailboxesStats.QuotaValue = exchangeOrgStats.AllocatedMailboxes;
|
mailboxesStats.QuotaValue = exchangeOrgStats.AllocatedMailboxes;
|
||||||
if (exchangeOrgStats.AllocatedMailboxes != -1) mailboxesStats.QuotaAvailable = exchangeTenantStats.AllocatedMailboxes - exchangeTenantStats.CreatedMailboxes;
|
if (exchangeOrgStats.AllocatedMailboxes != -1) mailboxesStats.QuotaAvailable = exchangeTenantStats.AllocatedMailboxes - exchangeTenantStats.CreatedMailboxes;
|
||||||
|
|
||||||
contactsStats.QuotaUsedValue = exchangeOrgStats.CreatedContacts;
|
|
||||||
contactsStats.QuotaValue = exchangeOrgStats.AllocatedContacts;
|
|
||||||
if (exchangeOrgStats.AllocatedContacts != -1) contactsStats.QuotaAvailable = exchangeTenantStats.AllocatedContacts - exchangeTenantStats.CreatedContacts;
|
|
||||||
|
|
||||||
listsStats.QuotaUsedValue = exchangeOrgStats.CreatedDistributionLists;
|
if (exchangeTenantStats.AllocatedContacts == 0) this.rowContacts.Style.Add("display", "none");
|
||||||
listsStats.QuotaValue = exchangeOrgStats.AllocatedDistributionLists;
|
else
|
||||||
if (exchangeOrgStats.AllocatedDistributionLists != -1) listsStats.QuotaAvailable = exchangeTenantStats.AllocatedDistributionLists - exchangeTenantStats.CreatedDistributionLists;
|
{
|
||||||
|
contactsStats.QuotaUsedValue = exchangeOrgStats.CreatedContacts;
|
||||||
|
contactsStats.QuotaValue = exchangeOrgStats.AllocatedContacts;
|
||||||
|
if (exchangeOrgStats.AllocatedContacts != -1) contactsStats.QuotaAvailable = exchangeTenantStats.AllocatedContacts - exchangeTenantStats.CreatedContacts;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (exchangeTenantStats.AllocatedDistributionLists == 0) this.rowLists.Style.Add("display", "none");
|
||||||
|
else
|
||||||
|
{
|
||||||
|
listsStats.QuotaUsedValue = exchangeOrgStats.CreatedDistributionLists;
|
||||||
|
listsStats.QuotaValue = exchangeOrgStats.AllocatedDistributionLists;
|
||||||
|
if (exchangeOrgStats.AllocatedDistributionLists != -1) listsStats.QuotaAvailable = exchangeTenantStats.AllocatedDistributionLists - exchangeTenantStats.CreatedDistributionLists;
|
||||||
|
}
|
||||||
|
|
||||||
exchangeStorageStats.QuotaUsedValue = exchangeOrgStats.UsedDiskSpace;
|
exchangeStorageStats.QuotaUsedValue = exchangeOrgStats.UsedDiskSpace;
|
||||||
exchangeStorageStats.QuotaValue = exchangeOrgStats.AllocatedDiskSpace;
|
exchangeStorageStats.QuotaValue = exchangeOrgStats.AllocatedDiskSpace;
|
||||||
if (exchangeOrgStats.AllocatedDiskSpace != -1) exchangeStorageStats.QuotaAvailable = exchangeTenantStats.AllocatedDiskSpace - exchangeTenantStats.UsedDiskSpace;
|
if (exchangeOrgStats.AllocatedDiskSpace != -1) exchangeStorageStats.QuotaAvailable = exchangeTenantStats.AllocatedDiskSpace - exchangeTenantStats.UsedDiskSpace;
|
||||||
|
|
||||||
foldersStats.QuotaUsedValue = exchangeOrgStats.CreatedPublicFolders;
|
if (exchangeTenantStats.AllocatedPublicFolders == 0) this.rowFolders.Style.Add("display", "none");
|
||||||
foldersStats.QuotaValue = exchangeOrgStats.AllocatedPublicFolders;
|
else
|
||||||
if (exchangeOrgStats.AllocatedPublicFolders != -1) foldersStats.QuotaAvailable = exchangeTenantStats.AllocatedPublicFolders - exchangeTenantStats.CreatedPublicFolders;
|
{
|
||||||
|
foldersStats.QuotaUsedValue = exchangeOrgStats.CreatedPublicFolders;
|
||||||
|
foldersStats.QuotaValue = exchangeOrgStats.AllocatedPublicFolders;
|
||||||
|
if (exchangeOrgStats.AllocatedPublicFolders != -1) foldersStats.QuotaAvailable = exchangeTenantStats.AllocatedPublicFolders - exchangeTenantStats.CreatedPublicFolders;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void BindOrgStats()
|
private void BindOrgStats()
|
||||||
|
|
|
@ -183,6 +183,15 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::WebsitePanel.Portal.QuotaViewer mailboxesStats;
|
protected global::WebsitePanel.Portal.QuotaViewer mailboxesStats;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// rowContacts control.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Auto-generated field.
|
||||||
|
/// To modify move field declaration from designer file to code-behind file.
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.HtmlControls.HtmlTableRow rowContacts;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// lnkContacts control.
|
/// lnkContacts control.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -201,6 +210,15 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::WebsitePanel.Portal.QuotaViewer contactsStats;
|
protected global::WebsitePanel.Portal.QuotaViewer contactsStats;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// rowLists control.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Auto-generated field.
|
||||||
|
/// To modify move field declaration from designer file to code-behind file.
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.HtmlControls.HtmlTableRow rowLists;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// lnkLists control.
|
/// lnkLists control.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -219,6 +237,15 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::WebsitePanel.Portal.QuotaViewer listsStats;
|
protected global::WebsitePanel.Portal.QuotaViewer listsStats;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// rowFolders control.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Auto-generated field.
|
||||||
|
/// To modify move field declaration from designer file to code-behind file.
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.HtmlControls.HtmlTableRow rowFolders;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// lnkFolders control.
|
/// lnkFolders control.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -111,6 +111,15 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
||||||
|
|
||||||
private void PrepareExchangeMenu(PackageContext cntx, List<MenuGroup> groups, string imagePath)
|
private void PrepareExchangeMenu(PackageContext cntx, List<MenuGroup> groups, string imagePath)
|
||||||
{
|
{
|
||||||
|
bool hideItems = false;
|
||||||
|
|
||||||
|
UserInfo user = UsersHelper.GetUser(PanelSecurity.EffectiveUserId);
|
||||||
|
|
||||||
|
if (user != null)
|
||||||
|
{
|
||||||
|
if ((user.Role == UserRole.User) & (CheckQouta(Quotas.EXCHANGE2007_ISCONSUMER, cntx)))
|
||||||
|
hideItems = true;
|
||||||
|
}
|
||||||
|
|
||||||
MenuGroup exchangeGroup = new MenuGroup(GetLocalizedString("Text.ExchangeGroup"), imagePath + "exchange24.png");
|
MenuGroup exchangeGroup = new MenuGroup(GetLocalizedString("Text.ExchangeGroup"), imagePath + "exchange24.png");
|
||||||
|
|
||||||
|
@ -126,16 +135,19 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
||||||
if (CheckQouta(Quotas.EXCHANGE2007_PUBLICFOLDERS, cntx))
|
if (CheckQouta(Quotas.EXCHANGE2007_PUBLICFOLDERS, cntx))
|
||||||
exchangeGroup.MenuItems.Add(CreateMenuItem("PublicFolders", "public_folders"));
|
exchangeGroup.MenuItems.Add(CreateMenuItem("PublicFolders", "public_folders"));
|
||||||
|
|
||||||
if (CheckQouta(Quotas.EXCHANGE2007_ACTIVESYNCALLOWED, cntx))
|
if (!hideItems)
|
||||||
exchangeGroup.MenuItems.Add(CreateMenuItem("ActiveSyncPolicy", "activesync_policy"));
|
if (CheckQouta(Quotas.EXCHANGE2007_ACTIVESYNCALLOWED, cntx))
|
||||||
|
exchangeGroup.MenuItems.Add(CreateMenuItem("ActiveSyncPolicy", "activesync_policy"));
|
||||||
|
|
||||||
if (CheckQouta(Quotas.EXCHANGE2007_MAILBOXES, cntx))
|
if (CheckQouta(Quotas.EXCHANGE2007_MAILBOXES, cntx))
|
||||||
exchangeGroup.MenuItems.Add(CreateMenuItem("MailboxPlans", "mailboxplans"));
|
exchangeGroup.MenuItems.Add(CreateMenuItem("MailboxPlans", "mailboxplans"));
|
||||||
|
|
||||||
if (CheckQouta(Quotas.ORGANIZATION_DOMAINS, cntx))
|
if (!hideItems)
|
||||||
exchangeGroup.MenuItems.Add(CreateMenuItem("DomainNames", "domains"));
|
if (CheckQouta(Quotas.ORGANIZATION_DOMAINS, cntx))
|
||||||
|
exchangeGroup.MenuItems.Add(CreateMenuItem("DomainNames", "domains"));
|
||||||
|
|
||||||
exchangeGroup.MenuItems.Add(CreateMenuItem("StorageUsage", "storage_usage"));
|
if (!hideItems)
|
||||||
|
exchangeGroup.MenuItems.Add(CreateMenuItem("StorageUsage", "storage_usage"));
|
||||||
|
|
||||||
if (exchangeGroup.MenuItems.Count > 0)
|
if (exchangeGroup.MenuItems.Count > 0)
|
||||||
groups.Add(exchangeGroup);
|
groups.Add(exchangeGroup);
|
||||||
|
@ -144,14 +156,27 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
||||||
|
|
||||||
private void PrepareOrganizationMenu(PackageContext cntx, List<MenuGroup> groups, string imagePath)
|
private void PrepareOrganizationMenu(PackageContext cntx, List<MenuGroup> groups, string imagePath)
|
||||||
{
|
{
|
||||||
MenuGroup organizationGroup = new MenuGroup(GetLocalizedString("Text.OrganizationGroup"), imagePath + "company24.png");
|
bool hideItems = false;
|
||||||
//if (CheckQouta(Quotas.ORGANIZATION_DOMAINS, cntx))
|
|
||||||
// organizationGroup.MenuItems.Add(CreateMenuItem("DomainNames", "domains"));
|
|
||||||
if (CheckQouta(Quotas.ORGANIZATION_USERS, cntx))
|
|
||||||
organizationGroup.MenuItems.Add(CreateMenuItem("Users", "users"));
|
|
||||||
|
|
||||||
if (organizationGroup.MenuItems.Count >0)
|
UserInfo user = UsersHelper.GetUser(PanelSecurity.EffectiveUserId);
|
||||||
groups.Add(organizationGroup);
|
|
||||||
|
if (user != null)
|
||||||
|
{
|
||||||
|
if ((user.Role == UserRole.User) & (CheckQouta(Quotas.EXCHANGE2007_ISCONSUMER, cntx)))
|
||||||
|
hideItems = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!hideItems)
|
||||||
|
{
|
||||||
|
MenuGroup organizationGroup = new MenuGroup(GetLocalizedString("Text.OrganizationGroup"), imagePath + "company24.png");
|
||||||
|
//if (CheckQouta(Quotas.ORGANIZATION_DOMAINS, cntx))
|
||||||
|
// organizationGroup.MenuItems.Add(CreateMenuItem("DomainNames", "domains"));
|
||||||
|
if (CheckQouta(Quotas.ORGANIZATION_USERS, cntx))
|
||||||
|
organizationGroup.MenuItems.Add(CreateMenuItem("Users", "users"));
|
||||||
|
|
||||||
|
if (organizationGroup.MenuItems.Count > 0)
|
||||||
|
groups.Add(organizationGroup);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,6 +49,8 @@ namespace WebsitePanel.Portal
|
||||||
if (!IsPostBack)
|
if (!IsPostBack)
|
||||||
{
|
{
|
||||||
BindUser();
|
BindUser();
|
||||||
|
|
||||||
|
if (PortalUtils.GetHideDemoCheckbox()) chkDemo.Visible = lblDemoAccount.Visible= false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -40,6 +40,8 @@ namespace WebsitePanel.Portal
|
||||||
if (!IsPostBack)
|
if (!IsPostBack)
|
||||||
{
|
{
|
||||||
BindUser();
|
BindUser();
|
||||||
|
|
||||||
|
if (PortalUtils.GetHideDemoCheckbox()) rowDemo.Visible = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue