diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/CRMController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/CRMController.cs index 0e776df7..956352f8 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/CRMController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/CRMController.cs @@ -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; } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Crm2011/CRMProvider2011.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Crm2011/CRMProvider2011.cs index 7600cc15..b19143bc 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Crm2011/CRMProvider2011.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Crm2011/CRMProvider2011.cs @@ -1520,6 +1520,8 @@ namespace WebsitePanel.Providers.HostedSolution return res; } + static string excludedRolesStr = ";пользователь поддержки;support user;"; + private static List FillCrmRoles(EntityCollection entities, bool isUserRole, Guid businessUnitId) { List res = new List(); @@ -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); } diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx index 75af90cf..94ad568b 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx @@ -3643,8 +3643,8 @@ General error has been occurred while getting crm user. - - CRM users quota has been reached. + + CRM users quota (full license) has been reached. Unable to add organization owner to organization users. @@ -5371,4 +5371,7 @@ Max Database Size, MB + + CRM users quota (limited license) has been reached. + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/CRM/CRMStorageSettings.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/CRM/CRMStorageSettings.ascx index 368d337a..abd05874 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/CRM/CRMStorageSettings.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/CRM/CRMStorageSettings.ascx @@ -41,11 +41,16 @@ Current usage (MB): of + + + Maximum allowed (MB): + + Reassign storage space (MB): - +