Merge
This commit is contained in:
commit
bfc44c2648
13 changed files with 92 additions and 24 deletions
|
@ -270,6 +270,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
|
||||
PackageContext cntx = PackageController.GetPackageContext(org.PackageId);
|
||||
int maxDBSize = cntx.Quotas[Quotas.CRM_MAXDATABASESIZE].QuotaAllocatedValue;
|
||||
if (maxDBSize != -1) maxDBSize = maxDBSize * 1024 * 1024;
|
||||
|
||||
org.CrmAdministratorId = user.AccountId;
|
||||
org.CrmCurrency =
|
||||
|
@ -1011,7 +1012,8 @@ namespace WebsitePanel.EnterpriseServer
|
|||
}
|
||||
if (!quotaRes.Value)
|
||||
{
|
||||
CompleteTask(res, CrmErrorCodes.USER_QUOTA_HAS_BEEN_REACHED, null, "CRM user quota has been reached.");
|
||||
CompleteTask(res, CrmErrorCodes.USER_QUOTA_HAS_BEEN_REACHED + CALType.ToString(), null, "CRM user quota " +
|
||||
(CALType==0 ? "(full license)" : "(limited license)") +" has been reached.");
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -1159,6 +1161,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
|
||||
if (limitSize != -1)
|
||||
{
|
||||
limitSize = limitSize * 1024 * 1024;
|
||||
if (maxSize == -1) maxSize = limitSize;
|
||||
if (maxSize > limitSize) maxSize = limitSize;
|
||||
}
|
||||
|
|
|
@ -1520,6 +1520,8 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
return res;
|
||||
}
|
||||
|
||||
static string excludedRolesStr = ";пользователь поддержки;support user;";
|
||||
|
||||
private static List<CrmRole> FillCrmRoles(EntityCollection entities, bool isUserRole, Guid businessUnitId)
|
||||
{
|
||||
List<CrmRole> res = new List<CrmRole>();
|
||||
|
@ -1536,10 +1538,16 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
continue;
|
||||
}
|
||||
|
||||
string roleName = role.Name;
|
||||
|
||||
if (roleName!=null)
|
||||
if (excludedRolesStr.IndexOf(";" + roleName.ToLower() + ";") != -1)
|
||||
continue;
|
||||
|
||||
CrmRole crmRole = new CrmRole();
|
||||
crmRole.IsCurrentUserRole = isUserRole;
|
||||
crmRole.RoleId = (Guid)role.RoleId;
|
||||
crmRole.RoleName = role.Name;
|
||||
crmRole.RoleName = roleName;
|
||||
|
||||
res.Add(crmRole);
|
||||
}
|
||||
|
|
|
@ -3643,8 +3643,8 @@
|
|||
<data name="HostedCRM.CANONT_GET_CRM_USER_GENERAL_ERROR" xml:space="preserve">
|
||||
<value>General error has been occurred while getting crm user.</value>
|
||||
</data>
|
||||
<data name="HostedCRM.USER_QUOTA_HAS_BEEN_REACHED" xml:space="preserve">
|
||||
<value>CRM users quota has been reached.</value>
|
||||
<data name="HostedCRM.USER_QUOTA_HAS_BEEN_REACHED0" xml:space="preserve">
|
||||
<value>CRM users quota (full license) has been reached.</value>
|
||||
</data>
|
||||
<data name="HostedCRM.CANNOT_ADD_ORGANIZATION_OWNER_TO_ORGANIZATIO_USER" xml:space="preserve">
|
||||
<value>Unable to add organization owner to organization users.</value>
|
||||
|
@ -5371,4 +5371,7 @@
|
|||
<data name="Quota.HostedCRM.MaxDatabaseSize" xml:space="preserve">
|
||||
<value>Max Database Size, MB</value>
|
||||
</data>
|
||||
<data name="HostedCRM.USER_QUOTA_HAS_BEEN_REACHED2" xml:space="preserve">
|
||||
<value>CRM users quota (limited license) has been reached.</value>
|
||||
</data>
|
||||
</root>
|
|
@ -41,11 +41,16 @@
|
|||
<td class="FormLabel200" align="right"><asp:Localize runat="server" meta:resourcekey="locUsageStorage" >Current usage (MB):</asp:Localize></td>
|
||||
<td>
|
||||
<asp:Label ID="lblDBSize" runat="server" Text="0" /> of <asp:Label ID="lblMAXDBSize" runat="server" Text="0" />
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="FormLabel200" align="right"><asp:Localize runat="server" meta:resourcekey="locLimitStorage" >Maximum allowed (MB):</asp:Localize></td>
|
||||
<td>
|
||||
<asp:Label ID="lblLimitDBSize" runat="server" Text="0" />
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="FormLabel200" align="right"><asp:Localize ID="locMaxStorage" runat="server" meta:resourcekey="locMaxStorage" >Reassign storage space (MB):</asp:Localize></td>
|
||||
<td>
|
||||
<uc1:QuotaEditor QuotaTypeId="2" ID="maxStorageSettingsValue" runat="server" />
|
||||
<uc1:QuotaEditor QuotaTypeId="2" ID="maxStorageSettingsValue" runat="server"/>
|
||||
</td>
|
||||
</tr>
|
||||
<!--
|
||||
|
|
|
@ -54,7 +54,9 @@ namespace WebsitePanel.Portal
|
|||
Organization org = ES.Services.Organizations.GetOrganization(PanelRequest.ItemID);
|
||||
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
||||
|
||||
maxStorageSettingsValue.ParentQuotaValue = cntx.Quotas[Quotas.CRM_MAXDATABASESIZE].QuotaAllocatedValue;
|
||||
int limitDBSize = cntx.Quotas[Quotas.CRM_MAXDATABASESIZE].QuotaAllocatedValue;
|
||||
//maxStorageSettingsValue.ParentQuotaValue = limitDBSize;
|
||||
maxStorageSettingsValue.ParentQuotaValue = -1;
|
||||
|
||||
long maxDBSize = ES.Services.CRM.GetMaxDBSize(PanelRequest.ItemID, PanelSecurity.PackageId);
|
||||
long DBSize = ES.Services.CRM.GetDBSize(PanelRequest.ItemID, PanelSecurity.PackageId);
|
||||
|
@ -66,6 +68,8 @@ namespace WebsitePanel.Portal
|
|||
|
||||
lblDBSize.Text = SizeValueToString(DBSize);
|
||||
lblMAXDBSize.Text = SizeValueToString(maxDBSize);
|
||||
|
||||
lblLimitDBSize.Text = SizeValueToString(limitDBSize);
|
||||
}
|
||||
|
||||
private void Save()
|
||||
|
|
|
@ -121,6 +121,15 @@ namespace WebsitePanel.Portal {
|
|||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblMAXDBSize;
|
||||
|
||||
/// <summary>
|
||||
/// lblLimitDBSize 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 lblLimitDBSize;
|
||||
|
||||
/// <summary>
|
||||
/// locMaxStorage control.
|
||||
/// </summary>
|
||||
|
|
|
@ -125,9 +125,9 @@ namespace WebsitePanel.Portal.CRM
|
|||
CALType);
|
||||
|
||||
if (!res2.IsSuccess)
|
||||
messageBox.ShowErrorMessage("UPDATE_CRM_USER_ROLES");
|
||||
messageBox.ShowMessage(res2, "UPDATE_CRM_USER_ROLES", "HostedCRM");
|
||||
else if (!res.IsSuccess)
|
||||
messageBox.ShowErrorMessage("UPDATE_CRM_USER_ROLES");
|
||||
messageBox.ShowMessage(res, "UPDATE_CRM_USER_ROLES", "HostedCRM");
|
||||
else
|
||||
messageBox.ShowMessage(res, "UPDATE_CRM_USER_ROLES", "HostedCRM");
|
||||
}
|
||||
|
|
|
@ -224,7 +224,7 @@
|
|||
</tr>
|
||||
<tr class="OrgStatsRow">
|
||||
<td align="right" nowrap>
|
||||
<asp:Localize ID="locCRMDBSize" runat="server" meta:resourcekey="locCRMDBSize" Text="Storage size (ÌÂ):"></asp:Localize>
|
||||
<asp:HyperLink ID="lnkCRMDBSize" runat="server" meta:resourcekey="lnkCRMDBSize" Text="Storage size (ÌÂ):"></asp:HyperLink>
|
||||
</td>
|
||||
<td>
|
||||
<wsp:QuotaViewer ID="crmDBSize" runat="server" QuotaTypeId="2" DisplayGauge="true" />
|
||||
|
|
|
@ -248,6 +248,9 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
|
||||
lnkLimitedCRMUsers.NavigateUrl = lnkCRMUsers.NavigateUrl;
|
||||
|
||||
lnkCRMDBSize.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "crm_storage_settings",
|
||||
"SpaceID=" + PanelSecurity.PackageId);
|
||||
|
||||
crmUsersStats.QuotaUsedValue = stats.CreatedCRMUsers;
|
||||
crmUsersStats.QuotaValue = stats.AllocatedCRMUsers;
|
||||
|
||||
|
|
|
@ -554,13 +554,13 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
|||
protected global::WebsitePanel.Portal.QuotaViewer crmLimitedUsersStats;
|
||||
|
||||
/// <summary>
|
||||
/// locCRMDBSize control.
|
||||
/// lnkCRMDBSize 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 locCRMDBSize;
|
||||
protected global::System.Web.UI.WebControls.HyperLink lnkCRMDBSize;
|
||||
|
||||
/// <summary>
|
||||
/// crmDBSize control.
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="OrganizationUserSetupInstructions.ascx.cs" Inherits="WebsitePanel.Portal.ExchangeServer.OrganizationUserSetupInstructions" %>
|
||||
<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
|
||||
<%@ Register Src="UserControls/MailboxTabs.ascx" TagName="MailboxTabs" TagPrefix="wsp" %>
|
||||
<%@ Register src="UserControls/UserTabs.ascx" tagname="UserTabs" tagprefix="wsp" %>
|
||||
<%@ Register Src="UserControls/Menu.ascx" TagName="Menu" TagPrefix="wsp" %>
|
||||
<%@ Register Src="UserControls/SizeBox.ascx" TagName="SizeBox" TagPrefix="wsp" %>
|
||||
<%@ Register Src="UserControls/DaysBox.ascx" TagName="DaysBox" TagPrefix="wsp" %>
|
||||
|
@ -25,7 +26,8 @@
|
|||
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Edit Mailbox"></asp:Localize>
|
||||
</div>
|
||||
<div class="FormBody">
|
||||
<wsp:MailboxTabs id="tabs" runat="server" SelectedTab="organization_user_setup" IsADUserTabs="true" />
|
||||
<wsp:UserTabs ID="UserTabs" runat="server" SelectedTab="organization_user_setup" />
|
||||
<wsp:MailboxTabs id="MailboxTabs" runat="server" SelectedTab="organization_user_setup" IsADUserTabs="true" />
|
||||
<wsp:SimpleMessageBox id="messageBox" runat="server" />
|
||||
|
||||
<wsp:CollapsiblePanel id="secEmail" runat="server" IsCollapsed="true"
|
||||
|
|
|
@ -39,6 +39,9 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
if (!IsPostBack)
|
||||
{
|
||||
BindInstructions();
|
||||
|
||||
MailboxTabs.Visible = (PanelRequest.Context == "Mailbox");
|
||||
UserTabs.Visible = (PanelRequest.Context == "User");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,4 +1,32 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// Copyright (c) 2012, Outercurve Foundation.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// - Redistributions of source code must retain the above copyright notice, this
|
||||
// list of conditions and the following disclaimer.
|
||||
//
|
||||
// - Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// - Neither the name of the Outercurve Foundation nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
|
@ -58,13 +86,22 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
|||
protected global::System.Web.UI.WebControls.Localize locTitle;
|
||||
|
||||
/// <summary>
|
||||
/// tabs control.
|
||||
/// UserTabs 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.MailboxTabs tabs;
|
||||
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.UserTabs UserTabs;
|
||||
|
||||
/// <summary>
|
||||
/// MailboxTabs 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.MailboxTabs MailboxTabs;
|
||||
|
||||
/// <summary>
|
||||
/// messageBox control.
|
||||
|
@ -164,14 +201,5 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
|||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Literal litContent;
|
||||
|
||||
/// <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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue