This commit is contained in:
Virtuworks 2012-09-03 13:07:46 -04:00
commit 63e0554449
51 changed files with 1538 additions and 1238 deletions

View file

@ -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,

View file

@ -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

View file

@ -25,8 +25,6 @@
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // 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 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
@ -74,6 +72,8 @@ namespace WebsitePanel.EnterpriseServer {
private System.Threading.SendOrPostCallback GetOrganizationStatisticsOperationCompleted; private System.Threading.SendOrPostCallback GetOrganizationStatisticsOperationCompleted;
private System.Threading.SendOrPostCallback GetOrganizationStatisticsByOrganizationOperationCompleted;
private System.Threading.SendOrPostCallback DeleteOrganizationOperationCompleted; private System.Threading.SendOrPostCallback DeleteOrganizationOperationCompleted;
private System.Threading.SendOrPostCallback GetOrganizationStorageLimitsOperationCompleted; private System.Threading.SendOrPostCallback GetOrganizationStorageLimitsOperationCompleted;
@ -248,6 +248,9 @@ namespace WebsitePanel.EnterpriseServer {
/// <remarks/> /// <remarks/>
public event GetOrganizationStatisticsCompletedEventHandler GetOrganizationStatisticsCompleted; public event GetOrganizationStatisticsCompletedEventHandler GetOrganizationStatisticsCompleted;
/// <remarks/>
public event GetOrganizationStatisticsByOrganizationCompletedEventHandler GetOrganizationStatisticsByOrganizationCompleted;
/// <remarks/> /// <remarks/>
public event DeleteOrganizationCompletedEventHandler DeleteOrganizationCompleted; public event DeleteOrganizationCompletedEventHandler DeleteOrganizationCompleted;
@ -723,6 +726,48 @@ namespace WebsitePanel.EnterpriseServer {
} }
} }
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetOrganizationStatisticsByOrganizat" +
"ion", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public OrganizationStatistics GetOrganizationStatisticsByOrganization(int itemId) {
object[] results = this.Invoke("GetOrganizationStatisticsByOrganization", new object[] {
itemId});
return ((OrganizationStatistics)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginGetOrganizationStatisticsByOrganization(int itemId, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("GetOrganizationStatisticsByOrganization", new object[] {
itemId}, callback, asyncState);
}
/// <remarks/>
public OrganizationStatistics EndGetOrganizationStatisticsByOrganization(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((OrganizationStatistics)(results[0]));
}
/// <remarks/>
public void GetOrganizationStatisticsByOrganizationAsync(int itemId) {
this.GetOrganizationStatisticsByOrganizationAsync(itemId, null);
}
/// <remarks/>
public void GetOrganizationStatisticsByOrganizationAsync(int itemId, object userState) {
if ((this.GetOrganizationStatisticsByOrganizationOperationCompleted == null)) {
this.GetOrganizationStatisticsByOrganizationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetOrganizationStatisticsByOrganizationOperationCompleted);
}
this.InvokeAsync("GetOrganizationStatisticsByOrganization", new object[] {
itemId}, this.GetOrganizationStatisticsByOrganizationOperationCompleted, userState);
}
private void OnGetOrganizationStatisticsByOrganizationOperationCompleted(object arg) {
if ((this.GetOrganizationStatisticsByOrganizationCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.GetOrganizationStatisticsByOrganizationCompleted(this, new GetOrganizationStatisticsByOrganizationCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/> /// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteOrganization", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteOrganization", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public int DeleteOrganization(int itemId) { public int DeleteOrganization(int itemId) {
@ -4774,6 +4819,32 @@ namespace WebsitePanel.EnterpriseServer {
} }
} }
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void GetOrganizationStatisticsByOrganizationCompletedEventHandler(object sender, GetOrganizationStatisticsByOrganizationCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetOrganizationStatisticsByOrganizationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal GetOrganizationStatisticsByOrganizationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public OrganizationStatistics Result {
get {
this.RaiseExceptionIfNecessary();
return ((OrganizationStatistics)(this.results[0]));
}
}
}
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void DeleteOrganizationCompletedEventHandler(object sender, DeleteOrganizationCompletedEventArgs e); public delegate void DeleteOrganizationCompletedEventHandler(object sender, DeleteOrganizationCompletedEventArgs e);

View file

@ -139,89 +139,116 @@ namespace WebsitePanel.EnterpriseServer
public static OrganizationStatistics GetOrganizationStatistics(int itemId) public static OrganizationStatistics GetOrganizationStatistics(int itemId)
{ {
#region Demo Mode return GetOrganizationStatisticsInternal(itemId, false);
if (IsDemoMode) }
{
OrganizationStatistics stats = new OrganizationStatistics();
stats.AllocatedMailboxes = 10;
stats.CreatedMailboxes = 4;
stats.AllocatedContacts = 4;
stats.CreatedContacts = 2;
stats.AllocatedDistributionLists = 5;
stats.CreatedDistributionLists = 1;
stats.AllocatedPublicFolders = 40;
stats.CreatedPublicFolders = 4;
stats.AllocatedDomains = 5;
stats.CreatedDomains = 2;
stats.AllocatedDiskSpace = 200;
stats.UsedDiskSpace = 70;
return stats;
}
#endregion
// place log record public static OrganizationStatistics GetOrganizationStatisticsByOrganization(int itemId)
TaskManager.StartTask("EXCHANGE", "GET_ORG_STATS"); {
TaskManager.ItemId = itemId; return GetOrganizationStatisticsInternal(itemId, true);
}
try
{ private static OrganizationStatistics GetOrganizationStatisticsInternal(int itemId, bool byOrganization)
{
#region Demo Mode
if (IsDemoMode)
{
OrganizationStatistics stats = new OrganizationStatistics();
stats.AllocatedMailboxes = 10;
stats.CreatedMailboxes = 4;
stats.AllocatedContacts = 4;
stats.CreatedContacts = 2;
stats.AllocatedDistributionLists = 5;
stats.CreatedDistributionLists = 1;
stats.AllocatedPublicFolders = 40;
stats.CreatedPublicFolders = 4;
stats.AllocatedDomains = 5;
stats.CreatedDomains = 2;
stats.AllocatedDiskSpace = 200;
stats.UsedDiskSpace = 70;
return stats;
}
#endregion
// place log record
TaskManager.StartTask("EXCHANGE", "GET_ORG_STATS");
TaskManager.ItemId = itemId;
try
{
Organization org = (Organization)PackageController.GetPackageItem(itemId); Organization org = (Organization)PackageController.GetPackageItem(itemId);
if (org == null) if (org == null)
return null; return null;
OrganizationStatistics stats = new OrganizationStatistics(); OrganizationStatistics stats = new OrganizationStatistics();
UserInfo user = ObjectUtils.FillObjectFromDataReader<UserInfo>(DataProvider.GetUserByExchangeOrganizationIdInternally(itemId));
List<PackageInfo> Packages = PackageController.GetPackages(user.UserId); if (byOrganization)
if ((Packages != null) & (Packages.Count > 0))
{ {
foreach (PackageInfo Package in Packages) OrganizationStatistics tempStats = ObjectUtils.FillObjectFromDataReader<OrganizationStatistics>(DataProvider.GetExchangeOrganizationStatistics(org.Id));
stats.CreatedMailboxes = tempStats.CreatedMailboxes;
stats.CreatedContacts = tempStats.CreatedContacts;
stats.CreatedDistributionLists = tempStats.CreatedDistributionLists;
stats.CreatedDomains = tempStats.CreatedDomains;
stats.CreatedPublicFolders = tempStats.CreatedPublicFolders;
stats.UsedDiskSpace = tempStats.UsedDiskSpace;
}
else
{
UserInfo user = ObjectUtils.FillObjectFromDataReader<UserInfo>(DataProvider.GetUserByExchangeOrganizationIdInternally(org.Id));
List<PackageInfo> Packages = PackageController.GetPackages(user.UserId);
if ((Packages != null) & (Packages.Count > 0))
{ {
List<Organization> orgs = null; foreach (PackageInfo Package in Packages)
orgs = GetExchangeOrganizations(Package.PackageId, false);
if ((orgs != null) & (orgs.Count > 0))
{ {
foreach (Organization o in orgs) List<Organization> orgs = null;
{
OrganizationStatistics tempStats = ObjectUtils.FillObjectFromDataReader<OrganizationStatistics>(DataProvider.GetExchangeOrganizationStatistics(o.Id));
stats.CreatedMailboxes += tempStats.CreatedMailboxes; orgs = GetExchangeOrganizations(Package.PackageId, false);
stats.CreatedContacts += tempStats.CreatedContacts;
stats.CreatedDistributionLists += tempStats.CreatedDistributionLists; if ((orgs != null) & (orgs.Count > 0))
stats.CreatedDomains += tempStats.CreatedDomains; {
stats.CreatedPublicFolders += tempStats.CreatedPublicFolders; foreach (Organization o in orgs)
stats.UsedDiskSpace += tempStats.UsedDiskSpace; {
OrganizationStatistics tempStats = ObjectUtils.FillObjectFromDataReader<OrganizationStatistics>(DataProvider.GetExchangeOrganizationStatistics(o.Id));
stats.CreatedMailboxes += tempStats.CreatedMailboxes;
stats.CreatedContacts += tempStats.CreatedContacts;
stats.CreatedDistributionLists += tempStats.CreatedDistributionLists;
stats.CreatedDomains += tempStats.CreatedDomains;
stats.CreatedPublicFolders += tempStats.CreatedPublicFolders;
stats.UsedDiskSpace += tempStats.UsedDiskSpace;
}
} }
} }
} }
} }
// disk space // disk space
//stats.UsedDiskSpace = org.DiskSpace; //stats.UsedDiskSpace = org.DiskSpace;
// allocated quotas // allocated quotas
PackageContext cntx = PackageController.GetPackageContext(org.PackageId); PackageContext cntx = PackageController.GetPackageContext(org.PackageId);
stats.AllocatedMailboxes = cntx.Quotas[Quotas.EXCHANGE2007_MAILBOXES].QuotaAllocatedValue; stats.AllocatedMailboxes = cntx.Quotas[Quotas.EXCHANGE2007_MAILBOXES].QuotaAllocatedValue;
stats.AllocatedContacts = cntx.Quotas[Quotas.EXCHANGE2007_CONTACTS].QuotaAllocatedValue; stats.AllocatedContacts = cntx.Quotas[Quotas.EXCHANGE2007_CONTACTS].QuotaAllocatedValue;
stats.AllocatedDistributionLists = cntx.Quotas[Quotas.EXCHANGE2007_DISTRIBUTIONLISTS].QuotaAllocatedValue; stats.AllocatedDistributionLists = cntx.Quotas[Quotas.EXCHANGE2007_DISTRIBUTIONLISTS].QuotaAllocatedValue;
stats.AllocatedPublicFolders = cntx.Quotas[Quotas.EXCHANGE2007_PUBLICFOLDERS].QuotaAllocatedValue; stats.AllocatedPublicFolders = cntx.Quotas[Quotas.EXCHANGE2007_PUBLICFOLDERS].QuotaAllocatedValue;
stats.AllocatedDiskSpace = cntx.Quotas[Quotas.EXCHANGE2007_DISKSPACE].QuotaAllocatedValue; stats.AllocatedDiskSpace = cntx.Quotas[Quotas.EXCHANGE2007_DISKSPACE].QuotaAllocatedValue;
return stats;
}
catch (Exception ex)
{
throw TaskManager.WriteError(ex);
}
finally
{
TaskManager.CompleteTask();
}
}
return stats;
}
catch (Exception ex)
{
throw TaskManager.WriteError(ex);
}
finally
{
TaskManager.CompleteTask();
}
}
public static int CalculateOrganizationDiskspace(int itemId) public static int CalculateOrganizationDiskspace(int itemId)
{ {

View file

@ -312,11 +312,14 @@ namespace WebsitePanel.EnterpriseServer
//create temporary domain name; //create temporary domain name;
string domainName = CreateTemporyDomainName(serviceId, organizationId); string domainName = CreateTemporyDomainName(serviceId, organizationId);
if (string.IsNullOrEmpty(domainName)) if (string.IsNullOrEmpty(domainName))
{ {
RollbackOrganization(packageId, organizationId); domainName = organizationName;
return BusinessErrorCodes.ERROR_ORGANIZATION_TEMP_DOMAIN_IS_NOT_SPECIFIED; //RollbackOrganization(packageId, organizationId);
//return BusinessErrorCodes.ERROR_ORGANIZATION_TEMP_DOMAIN_IS_NOT_SPECIFIED;
} }
bool domainCreated; bool domainCreated;
int domainId = CreateDomain(domainName, packageId, out domainCreated); int domainId = CreateDomain(domainName, packageId, out domainCreated);
@ -856,6 +859,17 @@ namespace WebsitePanel.EnterpriseServer
} }
public static OrganizationStatistics GetOrganizationStatistics(int itemId) public static OrganizationStatistics GetOrganizationStatistics(int itemId)
{
return GetOrganizationStatisticsInternal(itemId, false);
}
public static OrganizationStatistics GetOrganizationStatisticsByOrganization(int itemId)
{
return GetOrganizationStatisticsInternal(itemId, true);
}
private static OrganizationStatistics GetOrganizationStatisticsInternal(int itemId, bool byOrganization)
{ {
#region Demo Mode #region Demo Mode
if (IsDemoMode) if (IsDemoMode)
@ -880,7 +894,7 @@ namespace WebsitePanel.EnterpriseServer
return stats; return stats;
} }
#endregion #endregion
// place log record // place log record
TaskManager.StartTask("ORGANIZATION", "GET_ORG_STATS"); TaskManager.StartTask("ORGANIZATION", "GET_ORG_STATS");
TaskManager.ItemId = itemId; TaskManager.ItemId = itemId;
@ -892,54 +906,93 @@ namespace WebsitePanel.EnterpriseServer
return null; return null;
OrganizationStatistics stats = new OrganizationStatistics(); OrganizationStatistics stats = new OrganizationStatistics();
if (byOrganization)
UserInfo user = ObjectUtils.FillObjectFromDataReader<UserInfo>(DataProvider.GetUserByExchangeOrganizationIdInternally(itemId));
List<PackageInfo> Packages = PackageController.GetPackages(user.UserId);
if ((Packages != null) & (Packages.Count > 0))
{ {
foreach (PackageInfo Package in Packages) OrganizationStatistics tempStats = ObjectUtils.FillObjectFromDataReader<OrganizationStatistics>(DataProvider.GetOrganizationStatistics(org.Id));
stats.CreatedUsers = tempStats.CreatedUsers;
stats.CreatedDomains = tempStats.CreatedDomains;
PackageContext cntxTmp = PackageController.GetPackageContext(org.PackageId);
if (cntxTmp.Groups.ContainsKey(ResourceGroups.HostedSharePoint))
{ {
List<Organization> orgs = null; SharePointSiteCollectionListPaged sharePointStats = HostedSharePointServerController.GetSiteCollectionsPaged(org.PackageId, org.Id, string.Empty, string.Empty, string.Empty, 0, 0);
stats.CreatedSharePointSiteCollections = sharePointStats.TotalRowCount;
}
orgs = ExchangeServerController.GetExchangeOrganizations(Package.PackageId, false); if (cntxTmp.Groups.ContainsKey(ResourceGroups.HostedCRM))
{
stats.CreatedCRMUsers = CRMController.GetCRMUsersCount(org.Id, string.Empty, string.Empty).Value;
}
if ((orgs != null) & (orgs.Count > 0)) if (cntxTmp.Groups.ContainsKey(ResourceGroups.BlackBerry))
{
stats.CreatedBlackBerryUsers = BlackBerryController.GetBlackBerryUsersCount(org.Id, string.Empty, string.Empty).Value;
}
if (cntxTmp.Groups.ContainsKey(ResourceGroups.OCS))
{
stats.CreatedOCSUsers = OCSController.GetOCSUsersCount(org.Id, string.Empty, string.Empty).Value;
}
if (cntxTmp.Groups.ContainsKey(ResourceGroups.Lync))
{
stats.CreatedLyncUsers = LyncController.GetLyncUsersCount(org.Id).Value;
}
}
else
{
UserInfo user = ObjectUtils.FillObjectFromDataReader<UserInfo>(DataProvider.GetUserByExchangeOrganizationIdInternally(org.Id));
List<PackageInfo> Packages = PackageController.GetPackages(user.UserId);
if ((Packages != null) & (Packages.Count > 0))
{
foreach (PackageInfo Package in Packages)
{ {
foreach (Organization o in orgs) List<Organization> orgs = null;
orgs = ExchangeServerController.GetExchangeOrganizations(Package.PackageId, false);
if ((orgs != null) & (orgs.Count > 0))
{ {
OrganizationStatistics tempStats = ObjectUtils.FillObjectFromDataReader<OrganizationStatistics>(DataProvider.GetOrganizationStatistics(o.Id)); foreach (Organization o in orgs)
stats.CreatedUsers += tempStats.CreatedUsers;
stats.CreatedDomains += tempStats.CreatedDomains;
PackageContext cntxTmp = PackageController.GetPackageContext(org.PackageId);
if (cntxTmp.Groups.ContainsKey(ResourceGroups.HostedSharePoint))
{ {
SharePointSiteCollectionListPaged sharePointStats = HostedSharePointServerController.GetSiteCollectionsPaged(org.PackageId, org.Id, string.Empty, string.Empty, string.Empty, 0, 0); OrganizationStatistics tempStats = ObjectUtils.FillObjectFromDataReader<OrganizationStatistics>(DataProvider.GetOrganizationStatistics(o.Id));
stats.CreatedSharePointSiteCollections += sharePointStats.TotalRowCount;
}
if (cntxTmp.Groups.ContainsKey(ResourceGroups.HostedCRM)) stats.CreatedUsers += tempStats.CreatedUsers;
{ stats.CreatedDomains += tempStats.CreatedDomains;
stats.CreatedCRMUsers += CRMController.GetCRMUsersCount(org.Id, string.Empty, string.Empty).Value;
}
if (cntxTmp.Groups.ContainsKey(ResourceGroups.BlackBerry)) PackageContext cntxTmp = PackageController.GetPackageContext(org.PackageId);
{
stats.CreatedBlackBerryUsers += BlackBerryController.GetBlackBerryUsersCount(org.Id, string.Empty, string.Empty).Value;
}
if (cntxTmp.Groups.ContainsKey(ResourceGroups.OCS)) if (cntxTmp.Groups.ContainsKey(ResourceGroups.HostedSharePoint))
{ {
stats.CreatedOCSUsers += OCSController.GetOCSUsersCount(org.Id, string.Empty, string.Empty).Value; SharePointSiteCollectionListPaged sharePointStats = HostedSharePointServerController.GetSiteCollectionsPaged(org.PackageId, o.Id, string.Empty, string.Empty, string.Empty, 0, 0);
} stats.CreatedSharePointSiteCollections += sharePointStats.TotalRowCount;
}
if (cntxTmp.Groups.ContainsKey(ResourceGroups.Lync)) if (cntxTmp.Groups.ContainsKey(ResourceGroups.HostedCRM))
{ {
stats.CreatedLyncUsers += LyncController.GetLyncUsersCount(org.Id).Value; stats.CreatedCRMUsers += CRMController.GetCRMUsersCount(o.Id, string.Empty, string.Empty).Value;
}
if (cntxTmp.Groups.ContainsKey(ResourceGroups.BlackBerry))
{
stats.CreatedBlackBerryUsers += BlackBerryController.GetBlackBerryUsersCount(o.Id, string.Empty, string.Empty).Value;
}
if (cntxTmp.Groups.ContainsKey(ResourceGroups.OCS))
{
stats.CreatedOCSUsers += OCSController.GetOCSUsersCount(o.Id, string.Empty, string.Empty).Value;
}
if (cntxTmp.Groups.ContainsKey(ResourceGroups.Lync))
{
stats.CreatedLyncUsers += LyncController.GetLyncUsersCount(o.Id).Value;
}
} }
} }
} }
@ -951,16 +1004,14 @@ namespace WebsitePanel.EnterpriseServer
PackageContext cntx = PackageController.GetPackageContext(org.PackageId); PackageContext cntx = PackageController.GetPackageContext(org.PackageId);
stats.AllocatedUsers = cntx.Quotas[Quotas.ORGANIZATION_USERS].QuotaAllocatedValue; stats.AllocatedUsers = cntx.Quotas[Quotas.ORGANIZATION_USERS].QuotaAllocatedValue;
stats.AllocatedDomains = cntx.Quotas[Quotas.ORGANIZATION_DOMAINS].QuotaAllocatedValue; stats.AllocatedDomains = cntx.Quotas[Quotas.ORGANIZATION_DOMAINS].QuotaAllocatedValue;
if (cntx.Groups.ContainsKey(ResourceGroups.HostedSharePoint))
{
SharePointSiteCollectionListPaged sharePointStats = HostedSharePointServerController.GetSiteCollectionsPaged(org.PackageId, org.Id, string.Empty, string.Empty, string.Empty, 0, 0);
stats.AllocatedSharePointSiteCollections = cntx.Quotas[Quotas.HOSTED_SHAREPOINT_SITES].QuotaAllocatedValue;
}
if (cntx.Groups.ContainsKey(ResourceGroups.HostedSharePoint))
{
stats.AllocatedSharePointSiteCollections = cntx.Quotas[Quotas.HOSTED_SHAREPOINT_SITES].QuotaAllocatedValue;
}
if (cntx.Groups.ContainsKey(ResourceGroups.HostedCRM)) if (cntx.Groups.ContainsKey(ResourceGroups.HostedCRM))
{ {
stats.AllocatedCRMUsers = cntx.Quotas[Quotas.CRM_USERS].QuotaAllocatedValue; stats.AllocatedCRMUsers = cntx.Quotas[Quotas.CRM_USERS].QuotaAllocatedValue;
} }
@ -990,7 +1041,8 @@ namespace WebsitePanel.EnterpriseServer
TaskManager.CompleteTask(); TaskManager.CompleteTask();
} }
} }
public static int AddOrganizationDomain(int itemId, string domainName) public static int AddOrganizationDomain(int itemId, string domainName)
{ {
// check account // check account

View file

@ -719,6 +719,15 @@ namespace WebsitePanel.EnterpriseServer
// check account // check account
result.Result = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive result.Result = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive
| DemandAccount.IsReseller); | DemandAccount.IsReseller);
if (result.Result < 0)
result.Result = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive
| DemandAccount.IsPlatformCSR);
if (result.Result < 0)
result.Result = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive
| DemandAccount.IsResellerCSR);
if (result.Result < 0) return result; if (result.Result < 0) return result;
// load package // load package
@ -979,6 +988,15 @@ namespace WebsitePanel.EnterpriseServer
// check account // check account
result.Result = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive result.Result = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive
| DemandAccount.IsReseller); | DemandAccount.IsReseller);
if (result.Result < 0)
result.Result = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive
| DemandAccount.IsPlatformCSR);
if (result.Result < 0)
result.Result = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive
| DemandAccount.IsResellerCSR);
if (result.Result < 0) return result; if (result.Result < 0) return result;
int addonId = 0; int addonId = 0;
@ -1004,6 +1022,15 @@ namespace WebsitePanel.EnterpriseServer
// check account // check account
result.Result = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive result.Result = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive
| DemandAccount.IsReseller); | DemandAccount.IsReseller);
if (result.Result < 0)
result.Result = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive
| DemandAccount.IsPlatformCSR);
if (result.Result < 0)
result.Result = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive
| DemandAccount.IsResellerCSR);
if (result.Result < 0) return result; if (result.Result < 0) return result;
result.ExceedingQuotas = DataProvider.UpdatePackageAddon(SecurityContext.User.UserId, addon.PackageAddonId, result.ExceedingQuotas = DataProvider.UpdatePackageAddon(SecurityContext.User.UserId, addon.PackageAddonId,

View file

@ -81,8 +81,12 @@ namespace WebsitePanel.EnterpriseServer
return ExchangeServerController.GetOrganizationStatistics(itemId); return ExchangeServerController.GetOrganizationStatistics(itemId);
} }
[WebMethod]
public OrganizationStatistics GetOrganizationStatisticsByOrganization(int itemId)
{
return ExchangeServerController.GetOrganizationStatisticsByOrganization(itemId);
}
[WebMethod] [WebMethod]
public int DeleteOrganization(int itemId) public int DeleteOrganization(int itemId)
{ {

View file

@ -91,6 +91,13 @@ namespace WebsitePanel.EnterpriseServer
return OrganizationController.GetOrganizationStatistics(itemId); return OrganizationController.GetOrganizationStatistics(itemId);
} }
[WebMethod]
public OrganizationStatistics GetOrganizationStatisticsByOrganization(int itemId)
{
return OrganizationController.GetOrganizationStatisticsByOrganization(itemId);
}
[WebMethod] [WebMethod]
public Organization GetOrganization(int itemId) public Organization GetOrganization(int itemId)
{ {

View file

@ -37,4 +37,5 @@
<AdminContainer>Edit.ascx</AdminContainer> <AdminContainer>Edit.ascx</AdminContainer>
<!-- SSL Settings --> <!-- SSL Settings -->
<UseSSL>false</UseSSL> <UseSSL>false</UseSSL>
<HideDemoCheckbox>true</HideDemoCheckbox>
</SiteSettings> </SiteSettings>

View file

@ -197,7 +197,7 @@
</Module> </Module>
</Content> </Content>
<Content id="ContentPane"> <Content id="ContentPane">
<Module moduleDefinitionID="WebSites" title="WebSites" icon="location_48.png" /> <Module moduleDefinitionID="WebSites" title="WebSites" icon="location_48.png" readOnlyRoles="PlatformCSR,ResellerCSR"/>
</Content> </Content>
</Page> </Page>
@ -289,12 +289,12 @@
</Module> </Module>
</Content> </Content>
<Content id="ContentPane"> <Content id="ContentPane">
<Module moduleDefinitionID="SqlDatabases" title="Sql2000Databases" icon="mssql_48.png"> <Module moduleDefinitionID="SqlDatabases" title="Sql2000Databases" icon="mssql_48.png" readOnlyRoles="PlatformCSR,ResellerCSR">
<Settings> <Settings>
<Add name="GroupName" value="MsSQL2000" /> <Add name="GroupName" value="MsSQL2000" />
</Settings> </Settings>
</Module> </Module>
<Module moduleDefinitionID="SqlUsers" title="Sql2000Users" icon="db_user_48.png"> <Module moduleDefinitionID="SqlUsers" title="Sql2000Users" icon="db_user_48.png" readOnlyRoles="PlatformCSR,ResellerCSR">
<Settings> <Settings>
<Add name="GroupName" value="MsSQL2000" /> <Add name="GroupName" value="MsSQL2000" />
</Settings> </Settings>
@ -309,12 +309,12 @@
</Module> </Module>
</Content> </Content>
<Content id="ContentPane"> <Content id="ContentPane">
<Module moduleDefinitionID="SqlDatabases" title="Sql2005Databases" icon="mssql_48.png"> <Module moduleDefinitionID="SqlDatabases" title="Sql2005Databases" icon="mssql_48.png" readOnlyRoles="PlatformCSR,ResellerCSR">
<Settings> <Settings>
<Add name="GroupName" value="MsSQL2005" /> <Add name="GroupName" value="MsSQL2005" />
</Settings> </Settings>
</Module> </Module>
<Module moduleDefinitionID="SqlUsers" title="Sql2005Users" icon="db_user_48.png"> <Module moduleDefinitionID="SqlUsers" title="Sql2005Users" icon="db_user_48.png" readOnlyRoles="PlatformCSR,ResellerCSR">
<Settings> <Settings>
<Add name="GroupName" value="MsSQL2005" /> <Add name="GroupName" value="MsSQL2005" />
</Settings> </Settings>
@ -329,12 +329,12 @@
</Module> </Module>
</Content> </Content>
<Content id="ContentPane"> <Content id="ContentPane">
<Module moduleDefinitionID="SqlDatabases" title="Sql2008Databases" icon="mssql_48.png"> <Module moduleDefinitionID="SqlDatabases" title="Sql2008Databases" icon="mssql_48.png" readOnlyRoles="PlatformCSR,ResellerCSR">
<Settings> <Settings>
<Add name="GroupName" value="MsSQL2008" /> <Add name="GroupName" value="MsSQL2008" />
</Settings> </Settings>
</Module> </Module>
<Module moduleDefinitionID="SqlUsers" title="Sql2008Users" icon="db_user_48.png"> <Module moduleDefinitionID="SqlUsers" title="Sql2008Users" icon="db_user_48.png" readOnlyRoles="PlatformCSR,ResellerCSR">
<Settings> <Settings>
<Add name="GroupName" value="MsSQL2008" /> <Add name="GroupName" value="MsSQL2008" />
</Settings> </Settings>
@ -349,12 +349,12 @@
</Module> </Module>
</Content> </Content>
<Content id="ContentPane"> <Content id="ContentPane">
<Module moduleDefinitionID="SqlDatabases" title="Sql2012Databases" icon="mssql_48.png"> <Module moduleDefinitionID="SqlDatabases" title="Sql2012Databases" icon="mssql_48.png" readOnlyRoles="PlatformCSR,ResellerCSR">
<Settings> <Settings>
<Add name="GroupName" value="MsSQL2012" /> <Add name="GroupName" value="MsSQL2012" />
</Settings> </Settings>
</Module> </Module>
<Module moduleDefinitionID="SqlUsers" title="Sql2012Users" icon="db_user_48.png"> <Module moduleDefinitionID="SqlUsers" title="Sql2012Users" icon="db_user_48.png" readOnlyRoles="PlatformCSR,ResellerCSR">
<Settings> <Settings>
<Add name="GroupName" value="MsSQL2012" /> <Add name="GroupName" value="MsSQL2012" />
</Settings> </Settings>
@ -369,12 +369,12 @@
</Module> </Module>
</Content> </Content>
<Content id="ContentPane"> <Content id="ContentPane">
<Module moduleDefinitionID="SqlDatabases" title="MySql4Databases" icon="mysql_48.png"> <Module moduleDefinitionID="SqlDatabases" title="MySql4Databases" icon="mysql_48.png" readOnlyRoles="PlatformCSR,ResellerCSR">
<Settings> <Settings>
<Add name="GroupName" value="MySQL4" /> <Add name="GroupName" value="MySQL4" />
</Settings> </Settings>
</Module> </Module>
<Module moduleDefinitionID="SqlUsers" title="MySql4Users" icon="db_user_48.png"> <Module moduleDefinitionID="SqlUsers" title="MySql4Users" icon="db_user_48.png" readOnlyRoles="PlatformCSR,ResellerCSR">
<Settings> <Settings>
<Add name="GroupName" value="MySQL4" /> <Add name="GroupName" value="MySQL4" />
</Settings> </Settings>
@ -389,12 +389,12 @@
</Module> </Module>
</Content> </Content>
<Content id="ContentPane"> <Content id="ContentPane">
<Module moduleDefinitionID="SqlDatabases" title="MySql5Databases" icon="mysql_48.png"> <Module moduleDefinitionID="SqlDatabases" title="MySql5Databases" icon="mysql_48.png" readOnlyRoles="PlatformCSR,ResellerCSR">
<Settings> <Settings>
<Add name="GroupName" value="MySQL5" /> <Add name="GroupName" value="MySQL5" />
</Settings> </Settings>
</Module> </Module>
<Module moduleDefinitionID="SqlUsers" title="MySql5Users" icon="db_user_48.png"> <Module moduleDefinitionID="SqlUsers" title="MySql5Users" icon="db_user_48.png" readOnlyRoles="PlatformCSR,ResellerCSR">
<Settings> <Settings>
<Add name="GroupName" value="MySQL5" /> <Add name="GroupName" value="MySQL5" />
</Settings> </Settings>
@ -409,7 +409,7 @@
</Module> </Module>
</Content> </Content>
<Content id="ContentPane"> <Content id="ContentPane">
<Module moduleDefinitionID="SharedSSL" title="SharedSSL" icon="world_lock_48.png" /> <Module moduleDefinitionID="SharedSSL" title="SharedSSL" icon="world_lock_48.png" readOnlyRoles="PlatformCSR,ResellerCSR"/>
</Content> </Content>
</Page> </Page>
@ -420,7 +420,7 @@
</Module> </Module>
</Content> </Content>
<Content id="ContentPane"> <Content id="ContentPane">
<Module moduleDefinitionID="AdvancedStatistics" title="AdvancedStatistics" icon="stadistics_48.png" /> <Module moduleDefinitionID="AdvancedStatistics" title="AdvancedStatistics" icon="stadistics_48.png" readOnlyRoles="PlatformCSR,ResellerCSR"/>
</Content> </Content>
</Page> </Page>
@ -431,7 +431,7 @@
</Module> </Module>
</Content> </Content>
<Content id="ContentPane"> <Content id="ContentPane">
<Module moduleDefinitionID="ODBC" title="ODBC" icon="export_db_back_48.png" /> <Module moduleDefinitionID="ODBC" title="ODBC" icon="export_db_back_48.png" readOnlyRoles="PlatformCSR,ResellerCSR"/>
</Content> </Content>
</Page> </Page>
@ -442,7 +442,7 @@
</Module> </Module>
</Content> </Content>
<Content id="ContentPane"> <Content id="ContentPane">
<Module moduleDefinitionID="ScheduledTasks" title="ScheduledTasks" icon="calendar_month_2_clock_48.png" /> <Module moduleDefinitionID="ScheduledTasks" title="ScheduledTasks" icon="calendar_month_2_clock_48.png" readOnlyRoles="PlatformCSR,ResellerCSR"/>
</Content> </Content>
</Page> </Page>
@ -453,7 +453,7 @@
</Module> </Module>
</Content> </Content>
<Content id="ContentPane"> <Content id="ContentPane">
<Module moduleDefinitionID="FileManager" title="FileManager" icon="cabinet_48.png" /> <Module moduleDefinitionID="FileManager" title="FileManager" icon="cabinet_48.png" readOnlyRoles="PlatformCSR,ResellerCSR"/>
</Content> </Content>
</Page> </Page>
@ -464,7 +464,7 @@
</Module> </Module>
</Content> </Content>
<Content id="ContentPane"> <Content id="ContentPane">
<Module moduleDefinitionID="WebApplicationsGallery" title="WebApplicationsGallery" container="Browse.ascx" icon="dvd_disc_48.png" /> <Module moduleDefinitionID="WebApplicationsGallery" title="WebApplicationsGallery" container="Browse.ascx" icon="dvd_disc_48.png" readOnlyRoles="PlatformCSR,ResellerCSR"/>
</Content> </Content>
</Page> </Page>
@ -478,7 +478,7 @@
</Module> </Module>
</Content> </Content>
<Content id="ContentPane"> <Content id="ContentPane">
<Module moduleDefinitionID="SharePointSites" title="SharePointSites" icon="colors_48.png" /> <Module moduleDefinitionID="SharePointSites" title="SharePointSites" icon="colors_48.png" readOnlyRoles="PlatformCSR,ResellerCSR"/>
</Content> </Content>
</Page> </Page>
@ -489,8 +489,8 @@
</Module> </Module>
</Content> </Content>
<Content id="ContentPane"> <Content id="ContentPane">
<Module moduleDefinitionID="SharePointUsers" title="SharePointUsers" icon="user_48.png" /> <Module moduleDefinitionID="SharePointUsers" title="SharePointUsers" icon="user_48.png" readOnlyRoles="PlatformCSR,ResellerCSR"/>
<Module moduleDefinitionID="SharePointGroups" title="SharePointGroups" icon="group_48.png" /> <Module moduleDefinitionID="SharePointGroups" title="SharePointGroups" icon="group_48.png" readOnlyRoles="PlatformCSR,ResellerCSR"/>
</Content> </Content>
</Page> </Page>
@ -500,19 +500,19 @@
<Page name="SpaceExchangeServer" roles="Administrator,Reseller,PlatformCSR,ResellerCSR,PlatformHelpdesk,ResellerHelpdesk,User" hidden="True" skin="Exchange.ascx" adminskin="Exchange.ascx"> <Page name="SpaceExchangeServer" roles="Administrator,Reseller,PlatformCSR,ResellerCSR,PlatformHelpdesk,ResellerHelpdesk,User" hidden="True" skin="Exchange.ascx" adminskin="Exchange.ascx">
<Content id="ContentPane"> <Content id="ContentPane">
<Module moduleDefinitionID="ExchangeServer" title="ExchangeServer" icon="" container="Exchange.ascx" admincontainer="Exchange.ascx" readOnlyRoles="ResellerCSR"/> <Module moduleDefinitionID="ExchangeServer" title="ExchangeServer" icon="" container="Exchange.ascx" admincontainer="Exchange.ascx" readOnlyRoles="PlatformCSR,ResellerCSR"/>
</Content> </Content>
</Page> </Page>
<Page name="SpaceVPS" roles="Administrator,Reseller,PlatformCSR,ResellerCSR,PlatformHelpdesk,ResellerHelpdesk,User" hidden="True" skin="VPS.ascx" adminskin="VPS.ascx"> <Page name="SpaceVPS" roles="Administrator,Reseller,PlatformCSR,ResellerCSR,PlatformHelpdesk,ResellerHelpdesk,User" hidden="True" skin="VPS.ascx" adminskin="VPS.ascx">
<Content id="ContentPane"> <Content id="ContentPane">
<Module moduleDefinitionID="VPS" title="VirtualPrivateServers" icon="" container="VPS.ascx" admincontainer="VPS.ascx"/> <Module moduleDefinitionID="VPS" title="VirtualPrivateServers" icon="" container="VPS.ascx" admincontainer="VPS.ascx" readOnlyRoles="PlatformCSR,ResellerCSR"/>
</Content> </Content>
</Page> </Page>
<Page name="SpaceVPSForPC" roles="Administrator,Reseller,PlatformCSR,ResellerCSR,PlatformHelpdesk,ResellerHelpdesk,User" hidden="True" skin="VPS.ascx" adminskin="VPS.ascx"> <Page name="SpaceVPSForPC" roles="Administrator,Reseller,PlatformCSR,ResellerCSR,PlatformHelpdesk,ResellerHelpdesk,User" hidden="True" skin="VPS.ascx" adminskin="VPS.ascx">
<Content id="ContentPane"> <Content id="ContentPane">
<Module moduleDefinitionID="VPSForPC" title="VirtualPrivateServersForPrivateCloud" icon="" container="VPSForPC.ascx" admincontainer="VPSForPC.ascx"/> <Module moduleDefinitionID="VPSForPC" title="VirtualPrivateServersForPrivateCloud" icon="" container="VPSForPC.ascx" admincontainer="VPSForPC.ascx" readOnlyRoles="PlatformCSR,ResellerCSR"/>
</Content> </Content>
</Page> </Page>

View file

@ -975,6 +975,9 @@
<data name="Error.108" xml:space="preserve"> <data name="Error.108" xml:space="preserve">
<value>You should have Reseller priviledges to perform this operation</value> <value>You should have Reseller priviledges to perform this operation</value>
</data> </data>
<data name="Error.112" xml:space="preserve">
<value>You have not enough priviledges to perform this operation</value>
</data>
<data name="Error.1201" xml:space="preserve"> <data name="Error.1201" xml:space="preserve">
<value>Web Site does not exist</value> <value>Web Site does not exist</value>
</data> </data>

View file

@ -387,6 +387,40 @@ namespace WebsitePanel.Portal
} }
public static bool GetHideThemeAndLocale()
{
bool bResult = false;
try
{
bResult = Convert.ToBoolean(PortalConfiguration.SiteSettings["HideThemeAndLocale"]);
}
catch (Exception)
{
}
return bResult;
}
public static bool GetHideDemoCheckbox()
{
bool bResult = false;
try
{
bResult = Convert.ToBoolean(PortalConfiguration.SiteSettings["HideDemoCheckbox"]);
}
catch (Exception)
{
}
return bResult;
}
private static int GetAuthenticationFormsTimeout() private static int GetAuthenticationFormsTimeout()
{ {
//default //default

View file

@ -35,11 +35,14 @@ namespace WebsitePanel.Portal.BlackBerry
{ {
protected void Page_Load(object sender, EventArgs e) protected void Page_Load(object sender, EventArgs e)
{ {
OrganizationStatistics stats = ES.Services.Organizations.GetOrganizationStatistics(PanelRequest.ItemID); OrganizationStatistics stats = ES.Services.Organizations.GetOrganizationStatisticsByOrganization(PanelRequest.ItemID);
OrganizationStatistics tenantStats = ES.Services.Organizations.GetOrganizationStatistics(PanelRequest.ItemID);
int allocatedCrmUsers = stats.AllocatedBlackBerryUsers; int allocatedCrmUsers = stats.AllocatedBlackBerryUsers;
int usedUsers = stats.CreatedBlackBerryUsers; int usedUsers = stats.CreatedBlackBerryUsers;
usersQuota.QuotaUsedValue = usedUsers; usersQuota.QuotaUsedValue = usedUsers;
usersQuota.QuotaValue = allocatedCrmUsers; usersQuota.QuotaValue = allocatedCrmUsers;
if (stats.AllocatedBlackBerryUsers != -1) usersQuota.QuotaAvailable = tenantStats.AllocatedBlackBerryUsers - tenantStats.CreatedBlackBerryUsers;
} }
protected void btnCreateNewBlackBerryUser_Click(object sender, EventArgs e) protected void btnCreateNewBlackBerryUser_Click(object sender, EventArgs e)

View file

@ -44,12 +44,14 @@ namespace WebsitePanel.Portal.CRM
} }
else else
{ {
OrganizationStatistics stats = ES.Services.Organizations.GetOrganizationStatistics(PanelRequest.ItemID); OrganizationStatistics stats = ES.Services.Organizations.GetOrganizationStatisticsByOrganization(PanelRequest.ItemID);
OrganizationStatistics tenantStats = ES.Services.Organizations.GetOrganizationStatistics(PanelRequest.ItemID);
int allocatedCrmUsers = stats.AllocatedCRMUsers; int allocatedCrmUsers = stats.AllocatedCRMUsers;
int usedUsers = stats.CreatedCRMUsers; int usedUsers = stats.CreatedCRMUsers;
usersQuota.QuotaUsedValue = usedUsers; usersQuota.QuotaUsedValue = usedUsers;
usersQuota.QuotaValue = allocatedCrmUsers; usersQuota.QuotaValue = allocatedCrmUsers;
if (stats.AllocatedCRMUsers != -1) usersQuota.QuotaAvailable = tenantStats.AllocatedCRMUsers - tenantStats.CreatedCRMUsers;
} }
} }

View file

@ -166,7 +166,7 @@
&lt;p&gt;User account can also represent Exchange mailbox, which may be a person, room or inventory unit.&lt;/p&gt;</value> &lt;p&gt;User account can also represent Exchange mailbox, which may be a person, room or inventory unit.&lt;/p&gt;</value>
</data> </data>
<data name="locQuota.Text" xml:space="preserve"> <data name="locQuota.Text" xml:space="preserve">
<value>Total Users Created:</value> <value>Total Users Created in this Organization:</value>
</data> </data>
<data name="locTitle.Text" xml:space="preserve"> <data name="locTitle.Text" xml:space="preserve">
<value>Users</value> <value>Users</value>
@ -174,4 +174,10 @@
<data name="Text.PageName" xml:space="preserve"> <data name="Text.PageName" xml:space="preserve">
<value>Users</value> <value>Users</value>
</data> </data>
<data name="locTenantAvailable.Text" xml:space="preserve">
<value>Available Users for this Tenant:</value>
</data>
<data name="locTenantQuota.Text" xml:space="preserve">
<value>Total Users Created for this Tenant:</value>
</data>
</root> </root>

View file

@ -57,10 +57,11 @@ namespace WebsitePanel.Portal.ExchangeServer
private void BindStats() private void BindStats()
{ {
// quota values // quota values
OrganizationStatistics stats = OrganizationStatistics stats = ES.Services.ExchangeServer.GetOrganizationStatisticsByOrganization(PanelRequest.ItemID);
ES.Services.ExchangeServer.GetOrganizationStatistics(PanelRequest.ItemID); OrganizationStatistics tenantStats = ES.Services.ExchangeServer.GetOrganizationStatistics(PanelRequest.ItemID);
contactsQuota.QuotaUsedValue = stats.CreatedContacts; contactsQuota.QuotaUsedValue = stats.CreatedContacts;
contactsQuota.QuotaValue = stats.AllocatedContacts; contactsQuota.QuotaValue = stats.AllocatedContacts;
if (stats.AllocatedContacts != -1) contactsQuota.QuotaAvailable = tenantStats.AllocatedContacts - tenantStats.CreatedContacts;
} }
protected void btnCreateContact_Click(object sender, EventArgs e) protected void btnCreateContact_Click(object sender, EventArgs e)

View file

@ -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>

View file

@ -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"));
} }
} }

View file

@ -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;
} }
} }

View file

@ -57,10 +57,11 @@ namespace WebsitePanel.Portal.ExchangeServer
private void BindStats() private void BindStats()
{ {
// quota values // quota values
OrganizationStatistics stats = OrganizationStatistics stats = ES.Services.ExchangeServer.GetOrganizationStatisticsByOrganization(PanelRequest.ItemID);
ES.Services.ExchangeServer.GetOrganizationStatistics(PanelRequest.ItemID); OrganizationStatistics tenantStats = ES.Services.ExchangeServer.GetOrganizationStatistics(PanelRequest.ItemID);
listsQuota.QuotaUsedValue = stats.CreatedDistributionLists; listsQuota.QuotaUsedValue = stats.CreatedDistributionLists;
listsQuota.QuotaValue = stats.AllocatedDistributionLists; listsQuota.QuotaValue = stats.AllocatedDistributionLists;
if (stats.AllocatedDistributionLists != -1) listsQuota.QuotaAvailable = tenantStats.AllocatedDistributionLists - tenantStats.CreatedDistributionLists;
} }
protected void btnCreateList_Click(object sender, EventArgs e) protected void btnCreateList_Click(object sender, EventArgs e)

View file

@ -51,10 +51,11 @@ namespace WebsitePanel.Portal.ExchangeServer
private void BindStats() private void BindStats()
{ {
// set quotas // set quotas
OrganizationStatistics stats = OrganizationStatistics stats = ES.Services.Organizations.GetOrganizationStatisticsByOrganization(PanelRequest.ItemID);
ES.Services.Organizations.GetOrganizationStatistics(PanelRequest.ItemID); OrganizationStatistics tenantStats = ES.Services.Organizations.GetOrganizationStatistics(PanelRequest.ItemID);
domainsQuota.QuotaUsedValue = stats.CreatedDomains; domainsQuota.QuotaUsedValue = stats.CreatedDomains;
domainsQuota.QuotaValue = stats.AllocatedDomains; domainsQuota.QuotaValue = stats.AllocatedDomains;
if (stats.AllocatedDomains != -1) domainsQuota.QuotaAvailable = tenantStats.AllocatedDomains - tenantStats.CreatedDomains;
} }
public string GetDomainRecordsEditUrl(string domainId) public string GetDomainRecordsEditUrl(string domainId)

View file

@ -51,7 +51,7 @@ namespace WebsitePanel.Portal.ExchangeServer
{ {
if (cntx.Quotas[Quotas.EXCHANGE2007_ENABLEDPLANSEDITING].QuotaAllocatedValue != 1) if (cntx.Quotas[Quotas.EXCHANGE2007_ENABLEDPLANSEDITING].QuotaAllocatedValue != 1)
{ {
gvMailboxPlans.Columns[2].Visible = false; gvMailboxPlans.Columns[3].Visible = false;
btnAddMailboxPlan.Enabled = btnAddMailboxPlan.Visible = false; btnAddMailboxPlan.Enabled = btnAddMailboxPlan.Visible = false;
} }
} }

View file

@ -55,10 +55,11 @@ namespace WebsitePanel.Portal.ExchangeServer
private void BindStats() private void BindStats()
{ {
// quota values // quota values
OrganizationStatistics stats = OrganizationStatistics stats = ES.Services.ExchangeServer.GetOrganizationStatisticsByOrganization(PanelRequest.ItemID);
ES.Services.ExchangeServer.GetOrganizationStatistics(PanelRequest.ItemID); OrganizationStatistics tenantStats = ES.Services.ExchangeServer.GetOrganizationStatistics(PanelRequest.ItemID);
mailboxesQuota.QuotaUsedValue = stats.CreatedMailboxes; mailboxesQuota.QuotaUsedValue = stats.CreatedMailboxes;
mailboxesQuota.QuotaValue = stats.AllocatedMailboxes; mailboxesQuota.QuotaValue = stats.AllocatedMailboxes;
if (stats.AllocatedMailboxes != -1) mailboxesQuota.QuotaAvailable = tenantStats.AllocatedMailboxes - tenantStats.CreatedMailboxes;
} }
protected void btnCreateMailbox_Click(object sender, EventArgs e) protected void btnCreateMailbox_Click(object sender, EventArgs e)

View file

@ -59,10 +59,11 @@ namespace WebsitePanel.Portal.ExchangeServer
private void BindStats() private void BindStats()
{ {
OrganizationStatistics stats = OrganizationStatistics stats = ES.Services.ExchangeServer.GetOrganizationStatisticsByOrganization(PanelRequest.ItemID);
ES.Services.ExchangeServer.GetOrganizationStatistics(PanelRequest.ItemID); OrganizationStatistics tenantStats = ES.Services.ExchangeServer.GetOrganizationStatistics(PanelRequest.ItemID);
foldersQuota.QuotaUsedValue = stats.CreatedPublicFolders; foldersQuota.QuotaUsedValue = stats.CreatedPublicFolders;
foldersQuota.QuotaValue = stats.AllocatedPublicFolders; foldersQuota.QuotaValue = stats.AllocatedPublicFolders;
if (stats.AllocatedPublicFolders != -1) foldersQuota.QuotaAvailable = tenantStats.AllocatedPublicFolders - tenantStats.CreatedPublicFolders;
} }
private void BuildFoldersTree() private void BuildFoldersTree()

View file

@ -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,6 +102,14 @@
<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" id="rowFolders" runat="server">
<td align="right" nowrap>
<asp:HyperLink ID="lnkFolders" runat="server" meta:resourcekey="lnkFolders"></asp:HyperLink>
</td>
<td>
<wsp:QuotaViewer ID="foldersStats" QuotaTypeId="2" runat="server" DisplayGauge="true" />
</td>
</tr>
<tr class="OrgStatsRow"> <tr class="OrgStatsRow">
<td align="right" nowrap> <td align="right" nowrap>
<asp:HyperLink ID="lnkExchangeStorage" runat="server" meta:resourcekey="lnkExchangeStorage"></asp:HyperLink> <asp:HyperLink ID="lnkExchangeStorage" runat="server" meta:resourcekey="lnkExchangeStorage"></asp:HyperLink>

View file

@ -45,7 +45,9 @@ namespace WebsitePanel.Portal.ExchangeServer
private void BindExchangeStats() private void BindExchangeStats()
{ {
OrganizationStatistics exchangeOrgStats = ES.Services.ExchangeServer.GetOrganizationStatistics(PanelRequest.ItemID); OrganizationStatistics exchangeOrgStats = ES.Services.ExchangeServer.GetOrganizationStatisticsByOrganization(PanelRequest.ItemID);
OrganizationStatistics exchangeTenantStats = ES.Services.ExchangeServer.GetOrganizationStatistics(PanelRequest.ItemID);
lnkMailboxes.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "mailboxes", lnkMailboxes.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "mailboxes",
"SpaceID=" + PanelSecurity.PackageId.ToString()); "SpaceID=" + PanelSecurity.PackageId.ToString());
@ -58,19 +60,41 @@ namespace WebsitePanel.Portal.ExchangeServer
lnkExchangeStorage.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "storage_usage", lnkExchangeStorage.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "storage_usage",
"SpaceID=" + PanelSecurity.PackageId.ToString()); "SpaceID=" + PanelSecurity.PackageId.ToString());
lnkFolders.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "public_folders",
"SpaceID=" + PanelSecurity.PackageId.ToString());
mailboxesStats.QuotaUsedValue = exchangeOrgStats.CreatedMailboxes; mailboxesStats.QuotaUsedValue = exchangeOrgStats.CreatedMailboxes;
mailboxesStats.QuotaValue = exchangeOrgStats.AllocatedMailboxes; mailboxesStats.QuotaValue = exchangeOrgStats.AllocatedMailboxes;
if (exchangeOrgStats.AllocatedMailboxes != -1) mailboxesStats.QuotaAvailable = exchangeTenantStats.AllocatedMailboxes - exchangeTenantStats.CreatedMailboxes;
contactsStats.QuotaUsedValue = exchangeOrgStats.CreatedContacts;
contactsStats.QuotaValue = exchangeOrgStats.AllocatedContacts;
listsStats.QuotaUsedValue = exchangeOrgStats.CreatedDistributionLists; if (exchangeTenantStats.AllocatedContacts == 0) this.rowContacts.Style.Add("display", "none");
listsStats.QuotaValue = exchangeOrgStats.AllocatedDistributionLists; else
{
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 (exchangeTenantStats.AllocatedPublicFolders == 0) this.rowFolders.Style.Add("display", "none");
else
{
foldersStats.QuotaUsedValue = exchangeOrgStats.CreatedPublicFolders;
foldersStats.QuotaValue = exchangeOrgStats.AllocatedPublicFolders;
if (exchangeOrgStats.AllocatedPublicFolders != -1) foldersStats.QuotaAvailable = exchangeTenantStats.AllocatedPublicFolders - exchangeTenantStats.CreatedPublicFolders;
}
} }
private void BindOrgStats() private void BindOrgStats()
@ -83,15 +107,18 @@ namespace WebsitePanel.Portal.ExchangeServer
lblCreatedValue.Text = org.CreatedDate.Date.ToShortDateString(); lblCreatedValue.Text = org.CreatedDate.Date.ToShortDateString();
OrganizationStatistics orgStats = ES.Services.Organizations.GetOrganizationStatistics(PanelRequest.ItemID); OrganizationStatistics orgStats = ES.Services.Organizations.GetOrganizationStatisticsByOrganization(PanelRequest.ItemID);
OrganizationStatistics tenantStats = ES.Services.Organizations.GetOrganizationStatistics(PanelRequest.ItemID);
if (orgStats == null) if (orgStats == null)
return; return;
domainStats.QuotaUsedValue = orgStats.CreatedDomains; domainStats.QuotaUsedValue = orgStats.CreatedDomains;
domainStats.QuotaValue = orgStats.AllocatedDomains; domainStats.QuotaValue = orgStats.AllocatedDomains;
if (orgStats.AllocatedDomains != -1) domainStats.QuotaAvailable = tenantStats.AllocatedDomains - tenantStats.CreatedDomains;
userStats.QuotaUsedValue = orgStats.CreatedUsers; userStats.QuotaUsedValue = orgStats.CreatedUsers;
userStats.QuotaValue = orgStats.AllocatedUsers; userStats.QuotaValue = orgStats.AllocatedUsers;
if (orgStats.AllocatedUsers != -1) userStats.QuotaAvailable = tenantStats.AllocatedUsers - tenantStats.CreatedUsers;
@ -123,7 +150,7 @@ namespace WebsitePanel.Portal.ExchangeServer
"SpaceID=" + PanelSecurity.PackageId); "SpaceID=" + PanelSecurity.PackageId);
siteCollectionsStats.QuotaUsedValue = orgStats.CreatedSharePointSiteCollections; siteCollectionsStats.QuotaUsedValue = orgStats.CreatedSharePointSiteCollections;
siteCollectionsStats.QuotaValue = orgStats.AllocatedSharePointSiteCollections; siteCollectionsStats.QuotaValue = orgStats.AllocatedSharePointSiteCollections;
if (orgStats.AllocatedSharePointSiteCollections != -1) siteCollectionsStats.QuotaAvailable = tenantStats.AllocatedSharePointSiteCollections - tenantStats.CreatedSharePointSiteCollections;
} }
else else
sharePointStatsPanel.Visible = false; sharePointStatsPanel.Visible = false;
@ -131,7 +158,7 @@ namespace WebsitePanel.Portal.ExchangeServer
if (cntx.Groups.ContainsKey(ResourceGroups.OCS)) if (cntx.Groups.ContainsKey(ResourceGroups.OCS))
{ {
ocsStatsPanel.Visible = true; ocsStatsPanel.Visible = true;
BindOCSStats(); BindOCSStats(orgStats, tenantStats);
} }
else else
ocsStatsPanel.Visible = false; ocsStatsPanel.Visible = false;
@ -139,7 +166,7 @@ namespace WebsitePanel.Portal.ExchangeServer
if (cntx.Groups.ContainsKey(ResourceGroups.BlackBerry)) if (cntx.Groups.ContainsKey(ResourceGroups.BlackBerry))
{ {
besStatsPanel.Visible = true; besStatsPanel.Visible = true;
BindBESStats(); BindBESStats(orgStats, tenantStats);
} }
else else
besStatsPanel.Visible = false; besStatsPanel.Visible = false;
@ -147,7 +174,7 @@ namespace WebsitePanel.Portal.ExchangeServer
if (cntx.Groups.ContainsKey(ResourceGroups.Lync)) if (cntx.Groups.ContainsKey(ResourceGroups.Lync))
{ {
lyncStatsPanel.Visible = true; lyncStatsPanel.Visible = true;
BindLyncStats(); BindLyncStats(orgStats, tenantStats);
} }
else else
lyncStatsPanel.Visible = false; lyncStatsPanel.Visible = false;
@ -157,7 +184,7 @@ namespace WebsitePanel.Portal.ExchangeServer
if (org.CrmOrganizationId != Guid.Empty) if (org.CrmOrganizationId != Guid.Empty)
{ {
crmStatsPanel.Visible = true; crmStatsPanel.Visible = true;
BindCRMStats(orgStats); BindCRMStats(orgStats, tenantStats);
} }
else else
crmStatsPanel.Visible = false; crmStatsPanel.Visible = false;
@ -165,43 +192,42 @@ namespace WebsitePanel.Portal.ExchangeServer
} }
private void BindCRMStats(OrganizationStatistics orgStats) private void BindCRMStats(OrganizationStatistics stats, OrganizationStatistics tenantStats)
{ {
lnkCRMUsers.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "crmusers", lnkCRMUsers.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "crmusers",
"SpaceID=" + PanelSecurity.PackageId); "SpaceID=" + PanelSecurity.PackageId);
crmUsersStats.QuotaUsedValue = orgStats.CreatedCRMUsers; crmUsersStats.QuotaUsedValue = stats.CreatedCRMUsers;
crmUsersStats.QuotaValue = orgStats.AllocatedCRMUsers; crmUsersStats.QuotaValue = stats.AllocatedCRMUsers;
if (stats.AllocatedCRMUsers != -1) crmUsersStats.QuotaAvailable = tenantStats.AllocatedCRMUsers - tenantStats.CreatedCRMUsers;
} }
private void BindOCSStats() private void BindOCSStats(OrganizationStatistics stats, OrganizationStatistics tenantStats)
{ {
OrganizationStatistics stats = ES.Services.Organizations.GetOrganizationStatistics(PanelRequest.ItemID);
ocsUsersStats.QuotaValue = stats.AllocatedOCSUsers; ocsUsersStats.QuotaValue = stats.AllocatedOCSUsers;
ocsUsersStats.QuotaUsedValue = stats.CreatedOCSUsers; ocsUsersStats.QuotaUsedValue = stats.CreatedOCSUsers;
if (stats.AllocatedOCSUsers != -1) ocsUsersStats.QuotaAvailable = tenantStats.AllocatedOCSUsers - tenantStats.CreatedOCSUsers;
lnkOCSUsers.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "ocs_users", lnkOCSUsers.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "ocs_users",
"SpaceID=" + PanelSecurity.PackageId.ToString()); "SpaceID=" + PanelSecurity.PackageId.ToString());
} }
private void BindLyncStats() private void BindLyncStats(OrganizationStatistics stats, OrganizationStatistics tenantStats)
{ {
/*
OrganizationStatistics stats = ES.Services.Organizations.GetOrganizationStatistics(PanelRequest.ItemID);
lyncUsersStats.QuotaValue = stats.AllocatedLyncUsers; lyncUsersStats.QuotaValue = stats.AllocatedLyncUsers;
lyncUsersStats.QuotaUsedValue = stats.CreatedLyncUsers; lyncUsersStats.QuotaUsedValue = stats.CreatedLyncUsers;
if (stats.AllocatedLyncUsers != -1) lyncUsersStats.QuotaAvailable = tenantStats.AllocatedLyncUsers - tenantStats.CreatedLyncUsers;
lnkLyncUsers.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "lync_users", lnkLyncUsers.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "lync_users",
"SpaceID=" + PanelSecurity.PackageId.ToString()); "SpaceID=" + PanelSecurity.PackageId.ToString());
*/
} }
private void BindBESStats() private void BindBESStats(OrganizationStatistics stats, OrganizationStatistics tenantStats)
{ {
OrganizationStatistics stats = ES.Services.Organizations.GetOrganizationStatistics(PanelRequest.ItemID);
besUsersStats.QuotaValue = stats.AllocatedBlackBerryUsers; besUsersStats.QuotaValue = stats.AllocatedBlackBerryUsers;
besUsersStats.QuotaUsedValue = stats.CreatedBlackBerryUsers; besUsersStats.QuotaUsedValue = stats.CreatedBlackBerryUsers;
if (stats.AllocatedBlackBerryUsers != -1) besUsersStats.QuotaAvailable = tenantStats.AllocatedBlackBerryUsers - tenantStats.CreatedBlackBerryUsers;
lnkBESUsers.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "blackberry_users", lnkBESUsers.NavigateUrl = EditUrl("ItemID", PanelRequest.ItemID.ToString(), "blackberry_users",
"SpaceID=" + PanelSecurity.PackageId.ToString()); "SpaceID=" + PanelSecurity.PackageId.ToString());

View file

@ -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,33 @@ 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>
/// lnkFolders 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.HyperLink lnkFolders;
/// <summary>
/// foldersStats control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.QuotaViewer foldersStats;
/// <summary> /// <summary>
/// lnkExchangeStorage control. /// lnkExchangeStorage control.
/// </summary> /// </summary>
@ -416,14 +461,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::WebsitePanel.Portal.QuotaViewer crmUsersStats; protected global::WebsitePanel.Portal.QuotaViewer crmUsersStats;
/// <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;
} }
} }

View file

@ -58,10 +58,11 @@ namespace WebsitePanel.Portal.HostedSolution
private void BindStats() private void BindStats()
{ {
// quota values // quota values
OrganizationStatistics stats = OrganizationStatistics stats = ES.Services.Organizations.GetOrganizationStatisticsByOrganization(PanelRequest.ItemID);
ES.Services.Organizations.GetOrganizationStatistics(PanelRequest.ItemID); OrganizationStatistics tenantStats = ES.Services.Organizations.GetOrganizationStatistics(PanelRequest.ItemID);
usersQuota.QuotaUsedValue = stats.CreatedUsers; usersQuota.QuotaUsedValue = stats.CreatedUsers;
usersQuota.QuotaValue = stats.AllocatedUsers; usersQuota.QuotaValue = stats.AllocatedUsers;
if (stats.AllocatedUsers != -1) usersQuota.QuotaAvailable = tenantStats.AllocatedUsers - tenantStats.CreatedUsers;
} }
protected void btnCreateUser_Click(object sender, EventArgs e) protected void btnCreateUser_Click(object sender, EventArgs e)

View file

@ -4,7 +4,7 @@
<td> <td>
<asp:DataList ID="dlTabs" runat="server" RepeatDirection="Horizontal" <asp:DataList ID="dlTabs" runat="server" RepeatDirection="Horizontal"
RepeatLayout="Flow" EnableViewState="false" RepeatColumns="6" ItemStyle-Height="28px" SeparatorStyle-CssClass="Separator" SeparatorStyle-Height="22px" > RepeatLayout="Flow" EnableViewState="false" RepeatColumns="7" ItemStyle-Height="28px" SeparatorStyle-CssClass="Separator" SeparatorStyle-Height="22px" >
<ItemStyle Wrap="False" /> <ItemStyle Wrap="False" />
<ItemTemplate > <ItemTemplate >
<asp:HyperLink ID="lnkTab" runat="server" CssClass="Tab" NavigateUrl='<%# Eval("Url") %>'> <asp:HyperLink ID="lnkTab" runat="server" CssClass="Tab" NavigateUrl='<%# Eval("Url") %>'>

View file

@ -111,7 +111,16 @@ 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");
if (CheckQouta(Quotas.EXCHANGE2007_MAILBOXES, cntx)) if (CheckQouta(Quotas.EXCHANGE2007_MAILBOXES, cntx))
@ -126,16 +135,20 @@ 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 (!hideItems)
exchangeGroup.MenuItems.Add(CreateMenuItem("MailboxPlans", "mailboxplans")); if (CheckQouta(Quotas.EXCHANGE2007_MAILBOXES, cntx))
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 +157,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")); UserInfo user = UsersHelper.GetUser(PanelSecurity.EffectiveUserId);
if (CheckQouta(Quotas.ORGANIZATION_USERS, cntx))
organizationGroup.MenuItems.Add(CreateMenuItem("Users", "users")); if (user != null)
{
if (organizationGroup.MenuItems.Count >0) if ((user.Role == UserRole.User) & (CheckQouta(Quotas.EXCHANGE2007_ISCONSUMER, cntx)))
groups.Add(organizationGroup); 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);
}
} }

View file

@ -50,7 +50,7 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
{ {
List<Tab> tabsList = new List<Tab>(); List<Tab> tabsList = new List<Tab>();
tabsList.Add(CreateTab("edit_user", "Tab.General")); tabsList.Add(CreateTab("edit_user", "Tab.General"));
tabsList.Add(CreateTab("organization_user_setup", "Tab.Setup")); //tabsList.Add(CreateTab("organization_user_setup", "Tab.Setup"));
// find selected menu item // find selected menu item
int idx = 0; int idx = 0;

View file

@ -52,11 +52,12 @@ namespace WebsitePanel.Portal
private void BindStats() private void BindStats()
{ {
// quota values // quota values
OrganizationStatistics stats = OrganizationStatistics stats = ES.Services.Organizations.GetOrganizationStatisticsByOrganization(PanelRequest.ItemID);
ES.Services.Organizations.GetOrganizationStatistics(PanelRequest.ItemID); OrganizationStatistics tenantStats = ES.Services.Organizations.GetOrganizationStatistics(PanelRequest.ItemID);
siteCollectionsQuota.QuotaUsedValue = stats.CreatedSharePointSiteCollections; siteCollectionsQuota.QuotaUsedValue = stats.CreatedSharePointSiteCollections;
siteCollectionsQuota.QuotaValue = stats.AllocatedSharePointSiteCollections; siteCollectionsQuota.QuotaValue = stats.AllocatedSharePointSiteCollections;
if (stats.AllocatedSharePointSiteCollections != -1) siteCollectionsQuota.QuotaAvailable = tenantStats.AllocatedSharePointSiteCollections - tenantStats.CreatedSharePointSiteCollections;
} }
protected void btnCreateSiteCollection_Click(object sender, EventArgs e) protected void btnCreateSiteCollection_Click(object sender, EventArgs e)

View file

@ -143,6 +143,14 @@ namespace WebsitePanel.Portal
{ {
txtUsername.Text = cookie.Value; txtUsername.Text = cookie.Value;
} }
if (PortalUtils.GetHideThemeAndLocale())
{
ddlLanguage.Visible = false;
lblLanguage.Visible = false;
ddlTheme.Visible = false;
lblTheme.Visible = false;
}
} }
protected void cmdForgotPassword_Click(object sender, EventArgs e) protected void cmdForgotPassword_Click(object sender, EventArgs e)

View file

@ -41,11 +41,14 @@ namespace WebsitePanel.Portal.Lync
private void BindStats() private void BindStats()
{ {
OrganizationStatistics stats = ES.Services.Organizations.GetOrganizationStatistics(PanelRequest.ItemID); OrganizationStatistics stats = ES.Services.Organizations.GetOrganizationStatisticsByOrganization(PanelRequest.ItemID);
OrganizationStatistics tenantStats = ES.Services.Organizations.GetOrganizationStatistics(PanelRequest.ItemID);
int allocatedLyncUsers = stats.AllocatedLyncUsers; int allocatedLyncUsers = stats.AllocatedLyncUsers;
int usedUsers = stats.CreatedLyncUsers; int usedUsers = stats.CreatedLyncUsers;
usersQuota.QuotaUsedValue = usedUsers; usersQuota.QuotaUsedValue = usedUsers;
usersQuota.QuotaValue = allocatedLyncUsers; usersQuota.QuotaValue = allocatedLyncUsers;
if (stats.AllocatedLyncUsers != -1) usersQuota.QuotaAvailable = tenantStats.AllocatedLyncUsers - tenantStats.CreatedLyncUsers;
} }
protected void btnCreateUser_Click(object sender, EventArgs e) protected void btnCreateUser_Click(object sender, EventArgs e)

View file

@ -41,11 +41,14 @@ namespace WebsitePanel.Portal.OCS
private void BindStats() private void BindStats()
{ {
OrganizationStatistics stats = ES.Services.Organizations.GetOrganizationStatistics(PanelRequest.ItemID); OrganizationStatistics stats = ES.Services.Organizations.GetOrganizationStatisticsByOrganization(PanelRequest.ItemID);
OrganizationStatistics tenantStats = ES.Services.Organizations.GetOrganizationStatistics(PanelRequest.ItemID);
int allocatedOCSUsers = stats.AllocatedOCSUsers; int allocatedOCSUsers = stats.AllocatedOCSUsers;
int usedUsers = stats.CreatedOCSUsers; int usedUsers = stats.CreatedOCSUsers;
usersQuota.QuotaUsedValue = usedUsers; usersQuota.QuotaUsedValue = usedUsers;
usersQuota.QuotaValue = allocatedOCSUsers; usersQuota.QuotaValue = allocatedOCSUsers;
if (stats.AllocatedOCSUsers != -1) usersQuota.QuotaAvailable = tenantStats.AllocatedOCSUsers - tenantStats.CreatedOCSUsers;
} }
protected void btnCreateUser_Click(object sender, EventArgs e) protected void btnCreateUser_Click(object sender, EventArgs e)

View file

@ -49,6 +49,8 @@ namespace WebsitePanel.Portal
if (!IsPostBack) if (!IsPostBack)
{ {
BindUser(); BindUser();
if (PortalUtils.GetHideDemoCheckbox()) chkDemo.Visible = lblDemoAccount.Visible= false;
} }
} }

View file

@ -40,9 +40,27 @@ namespace WebsitePanel.Portal
{ {
BindSpace(); BindSpace();
BindSpaceAddons(); BindSpaceAddons();
BindRoles(PanelSecurity.EffectiveUserId);
} }
} }
private void BindRoles(int userId)
{
// load selected user
UserInfo user = UsersHelper.GetUser(userId);
if (user != null)
{
if ((user.Role == UserRole.User) |
(PanelSecurity.LoggedUser.Role == UserRole.ResellerCSR) |
(PanelSecurity.LoggedUser.Role == UserRole.ResellerHelpdesk) |
(PanelSecurity.LoggedUser.Role == UserRole.PlatformCSR) |
(PanelSecurity.LoggedUser.Role == UserRole.PlatformHelpdesk))
this.rbPackageQuotas.Enabled = this.rbPlanQuotas.Enabled = false;
}
}
private void BindSpace() private void BindSpace()
{ {
PackageInfo package = ES.Services.Packages.GetPackage(PanelSecurity.PackageId); PackageInfo package = ES.Services.Packages.GetPackage(PanelSecurity.PackageId);

View file

@ -19,7 +19,8 @@
<uc1:QuotaViewer ID="quota" runat="server" <uc1:QuotaViewer ID="quota" runat="server"
QuotaTypeId='<%# Eval("QuotaTypeId") %>' QuotaTypeId='<%# Eval("QuotaTypeId") %>'
QuotaUsedValue='<%# Eval("QuotaUsedValue") %>' QuotaUsedValue='<%# Eval("QuotaUsedValue") %>'
QuotaValue='<%# Eval("QuotaValue") %>' /> QuotaValue='<%# Eval("QuotaValue") %>'
QuotaAvailable='<%# Eval("QuotaAvailable") %>'/>
</div> </div>
</div> </div>
</ItemTemplate> </ItemTemplate>

View file

@ -54,6 +54,9 @@ namespace WebsitePanel.Portal
try try
{ {
dsQuotas = ES.Services.Packages.GetPackageQuotas(packageId); dsQuotas = ES.Services.Packages.GetPackageQuotas(packageId);
dsQuotas.Tables[1].Columns.Add("QuotaAvailable", typeof(int));
foreach (DataRow r in dsQuotas.Tables[1].Rows) r["QuotaAvailable"] = -1;
dlGroups.DataSource = dsQuotas.Tables[0]; dlGroups.DataSource = dsQuotas.Tables[0];
dlGroups.DataBind(); dlGroups.DataBind();
} }

View file

@ -1,10 +1,9 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
// Runtime Version:2.0.50727.3074
// //
// Changes to this file may cause incorrect behavior and will be lost if // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.
// </auto-generated> // </auto-generated>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------

View file

@ -40,6 +40,8 @@ namespace WebsitePanel.Portal
if (!IsPostBack) if (!IsPostBack)
{ {
BindUser(); BindUser();
if (PortalUtils.GetHideDemoCheckbox()) rowDemo.Visible = false;
} }
} }
@ -191,7 +193,8 @@ namespace WebsitePanel.Portal
{ {
if (user.Role == UserRole.Reseller || user.Role == UserRole.User) if (user.Role == UserRole.Reseller || user.Role == UserRole.User)
role.Items.Remove("Administrator"); role.Items.Remove("Administrator");
if (user.Role == UserRole.User) if ((user.Role == UserRole.User) |(PanelSecurity.LoggedUser.Role == UserRole.ResellerCSR) |
(PanelSecurity.LoggedUser.Role == UserRole.ResellerHelpdesk))
role.Items.Remove("Reseller"); role.Items.Remove("Reseller");
} }
} }

View file

@ -112,11 +112,14 @@
<value>2.0</value> <value>2.0</value>
</resheader> </resheader>
<resheader name="reader"> <resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<data name="Text.Available" xml:space="preserve">
<value>Available</value>
</data>
<data name="Text.Disabled" xml:space="preserve"> <data name="Text.Disabled" xml:space="preserve">
<value>Disabled</value> <value>Disabled</value>
</data> </data>

View file

@ -68,6 +68,12 @@ namespace WebsitePanel.Portal
set { ViewState["Total"] = value; } set { ViewState["Total"] = value; }
} }
public int Available
{
get { return (ViewState["Available"] != null) ? (int)ViewState["Available"] : -1; }
set { ViewState["Available"] = value; }
}
public int Width public int Width
{ {
get { return this.width; } get { return this.width; }

View file

@ -77,6 +77,7 @@ namespace WebsitePanel.Portal
quotaViewer.QuotaTypeId = quota.QuotaTypeId; quotaViewer.QuotaTypeId = quota.QuotaTypeId;
quotaViewer.QuotaUsedValue = quota.QuotaUsedValue; quotaViewer.QuotaUsedValue = quota.QuotaUsedValue;
quotaViewer.QuotaValue = quota.QuotaAllocatedValue; quotaViewer.QuotaValue = quota.QuotaAllocatedValue;
quotaViewer.QuotaAvailable = -1;
//this.Visible = quota.QuotaAllocatedValue != 0; //this.Visible = quota.QuotaAllocatedValue != 0;
} }
else else
@ -85,6 +86,7 @@ namespace WebsitePanel.Portal
quotaViewer.QuotaTypeId = 1; // bool quotaViewer.QuotaTypeId = 1; // bool
quotaViewer.QuotaUsedValue = 0; quotaViewer.QuotaUsedValue = 0;
quotaViewer.QuotaValue = 0; quotaViewer.QuotaValue = 0;
quotaViewer.QuotaAvailable = -1;
} }
} }
catch catch

View file

@ -2,5 +2,6 @@
<%@ Register Src="Gauge.ascx" TagName="Gauge" TagPrefix="uc1" %> <%@ Register Src="Gauge.ascx" TagName="Gauge" TagPrefix="uc1" %>
<uc1:Gauge ID="gauge" runat="server" <uc1:Gauge ID="gauge" runat="server"
Progress='<%# Eval("QuotaUsedValue") %>' Progress='<%# Eval("QuotaUsedValue") %>'
Total='<%# Eval("QuotaValue") %>' /> Total='<%# Eval("QuotaValue") %>'
Available='<%# Eval("QuotaAvailable") %>'/>
<asp:Label ID="litValue" runat="server"></asp:Label> <asp:Label ID="litValue" runat="server"></asp:Label>

View file

@ -77,6 +77,19 @@ namespace WebsitePanel.Portal
} }
} }
public int QuotaAvailable
{
set
{
// store value
gauge.Available = value;
// update control
UpdateControl();
}
}
private void UpdateControl() private void UpdateControl()
{ {
int total = gauge.Total; int total = gauge.Total;
@ -88,8 +101,12 @@ namespace WebsitePanel.Portal
} }
else if (QuotaTypeId == 2) else if (QuotaTypeId == 2)
{ {
litValue.Text = String.Format("{0} {1} {2}", string availableText = string.Empty;
gauge.Progress, GetLocalizedString("Text.Of"), ((total == -1) ? GetLocalizedString("Text.Unlimited") : total.ToString())); if (gauge.Available != -1) availableText = String.Format("({0} {1})", gauge.Available.ToString(), GetLocalizedString("Text.Available"));
litValue.Text = String.Format("{0} {1} {2} {3}",
gauge.Progress, GetLocalizedString("Text.Of"), ((total == -1) ? GetLocalizedString("Text.Unlimited") : total.ToString()), availableText);
gauge.Visible = (total != -1); gauge.Visible = (total != -1);
//litValue.Visible = (value == -1); //litValue.Visible = (value == -1);
} }

View file

@ -1,10 +1,9 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
// Runtime Version:2.0.50727.3053
// //
// Changes to this file may cause incorrect behavior and will be lost if // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.
// </auto-generated> // </auto-generated>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------

View file

@ -74,6 +74,10 @@ namespace WebsitePanel.Portal
if (!createResources) if (!createResources)
return; return;
if ((PanelSecurity.LoggedUser.Role == UserRole.ResellerCSR) |
(PanelSecurity.LoggedUser.Role == UserRole.ResellerHelpdesk))
this.chkCreateResources.Enabled = this.chkIntegratedOUProvisioning.Enabled = false;
bool systemEnabled = false; bool systemEnabled = false;
bool webEnabled = false; bool webEnabled = false;

View file

@ -62,6 +62,7 @@ namespace WebsitePanel.Portal
bool accountSummaryEmailEnabled = !String.IsNullOrEmpty(settings["EnableLetter"]) && Utils.ParseBool(settings["EnableLetter"], false); bool accountSummaryEmailEnabled = !String.IsNullOrEmpty(settings["EnableLetter"]) && Utils.ParseBool(settings["EnableLetter"], false);
this.chkAccountLetter.Enabled = accountSummaryEmailEnabled; this.chkAccountLetter.Enabled = accountSummaryEmailEnabled;
this.pnlDisabledSummaryLetterHint.Visible = !accountSummaryEmailEnabled; this.pnlDisabledSummaryLetterHint.Visible = !accountSummaryEmailEnabled;
if (PortalUtils.GetHideDemoCheckbox()) this.lblDemoAccount.Visible = this.chkDemo.Checked = this.chkDemo.Visible = false;
//reseller.UserId = PanelSecurity.SelectedUserId; //reseller.UserId = PanelSecurity.SelectedUserId;
userPassword.SetUserPolicy(PanelSecurity.SelectedUserId, UserSettings.WEBSITEPANEL_POLICY, "PasswordPolicy"); userPassword.SetUserPolicy(PanelSecurity.SelectedUserId, UserSettings.WEBSITEPANEL_POLICY, "PasswordPolicy");
@ -71,6 +72,10 @@ namespace WebsitePanel.Portal
{ {
if (user.Role == UserRole.User) if (user.Role == UserRole.User)
role.Items.Remove("Reseller"); role.Items.Remove("Reseller");
if ((PanelSecurity.LoggedUser.Role == UserRole.ResellerCSR) |
(PanelSecurity.LoggedUser.Role == UserRole.ResellerHelpdesk))
role.Items.Remove("Reseller");
} }
private void SaveUser() private void SaveUser()

View file

@ -56,8 +56,8 @@ REM %WSE_CLEAN% .\WebsitePanel.EnterpriseServer.Client\OCSProxy.cs
REM %WSDL% %SERVER_URL%/esOperatingSystems.asmx /out:.\WebsitePanel.EnterpriseServer.Client\OperatingSystemsProxy.cs /namespace:WebsitePanel.EnterpriseServer /type:webClient REM %WSDL% %SERVER_URL%/esOperatingSystems.asmx /out:.\WebsitePanel.EnterpriseServer.Client\OperatingSystemsProxy.cs /namespace:WebsitePanel.EnterpriseServer /type:webClient
REM %WSE_CLEAN% .\WebsitePanel.EnterpriseServer.Client\OperatingSystemsProxy.cs REM %WSE_CLEAN% .\WebsitePanel.EnterpriseServer.Client\OperatingSystemsProxy.cs
REM %WSDL% %SERVER_URL%/esOrganizations.asmx /out:.\WebsitePanel.EnterpriseServer.Client\OrganizationProxy.cs /namespace:WebsitePanel.EnterpriseServer.HostedSolution /type:webClient %WSDL% %SERVER_URL%/esOrganizations.asmx /out:.\WebsitePanel.EnterpriseServer.Client\OrganizationProxy.cs /namespace:WebsitePanel.EnterpriseServer.HostedSolution /type:webClient
REM %WSE_CLEAN% .\WebsitePanel.EnterpriseServer.Client\OrganizationProxy.cs %WSE_CLEAN% .\WebsitePanel.EnterpriseServer.Client\OrganizationProxy.cs
REM %WSDL% %SERVER_URL%/esPackages.asmx /out:.\WebsitePanel.EnterpriseServer.Client\PackagesProxy.cs /namespace:WebsitePanel.EnterpriseServer /type:webClient REM %WSDL% %SERVER_URL%/esPackages.asmx /out:.\WebsitePanel.EnterpriseServer.Client\PackagesProxy.cs /namespace:WebsitePanel.EnterpriseServer /type:webClient
REM %WSE_CLEAN% .\WebsitePanel.EnterpriseServer.Client\PackagesProxy.cs REM %WSE_CLEAN% .\WebsitePanel.EnterpriseServer.Client\PackagesProxy.cs
@ -92,8 +92,8 @@ REM %WSE_CLEAN% .\WebsitePanel.EnterpriseServer.Client\WebServersProxy.cs
REM %WSDL% %SERVER_URL%/esVirtualizationServerForPrivateCloud.asmx /out:.\WebsitePanel.EnterpriseServer.Client\VirtualizationServerProxyForPrivateCloud.cs /namespace:WebsitePanel.EnterpriseServer /type:webClient REM %WSDL% %SERVER_URL%/esVirtualizationServerForPrivateCloud.asmx /out:.\WebsitePanel.EnterpriseServer.Client\VirtualizationServerProxyForPrivateCloud.cs /namespace:WebsitePanel.EnterpriseServer /type:webClient
REM %WSE_CLEAN% .\WebsitePanel.EnterpriseServer.Client\VirtualizationServerProxyForPrivateCloud.cs REM %WSE_CLEAN% .\WebsitePanel.EnterpriseServer.Client\VirtualizationServerProxyForPrivateCloud.cs
%WSDL% %SERVER_URL%/esLync.asmx /out:.\WebsitePanel.EnterpriseServer.Client\LyncProxy.cs /namespace:WebsitePanel.EnterpriseServer /type:webClient REM %WSDL% %SERVER_URL%/esLync.asmx /out:.\WebsitePanel.EnterpriseServer.Client\LyncProxy.cs /namespace:WebsitePanel.EnterpriseServer /type:webClient
%WSE_CLEAN% .\WebsitePanel.EnterpriseServer.Client\LyncProxy.cs REM %WSE_CLEAN% .\WebsitePanel.EnterpriseServer.Client\LyncProxy.cs