Extended hosting plans (quotas) option to block tenant from creating and
deleting top domains.
This commit is contained in:
parent
2f569ccd05
commit
0b31970c71
8 changed files with 43 additions and 4 deletions
|
@ -1590,6 +1590,9 @@
|
|||
<data name="Quota.OS.FileManager" xml:space="preserve">
|
||||
<value>File Manager</value>
|
||||
</data>
|
||||
<data name="Quota.OS.AllowTenantCreateDomains" xml:space="preserve">
|
||||
<value>Tenant Top-Level Domain creation Allowed</value>
|
||||
</data>
|
||||
<data name="Quota.SharePoint.Groups" xml:space="preserve">
|
||||
<value>SharePoint Groups</value>
|
||||
</data>
|
||||
|
|
|
@ -55,6 +55,21 @@ namespace WebsitePanel.Portal
|
|||
|
||||
DomainLink.Enabled = (cntx.Quotas.ContainsKey(Quotas.OS_DOMAINS) && !cntx.Quotas[Quotas.OS_DOMAINS].QuotaExhausted);
|
||||
|
||||
if (DomainLink.Enabled)
|
||||
{
|
||||
UserInfo user = UsersHelper.GetUser(PanelSecurity.EffectiveUserId);
|
||||
|
||||
if (user != null)
|
||||
{
|
||||
if (user.Role == UserRole.User)
|
||||
{
|
||||
DomainLink.Enabled = Utils.CheckQouta(Quotas.OS_ALLOWTENANTCREATEDOMAINS, cntx);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
DomainInfo[] myDomains = ES.Services.Servers.GetMyDomains(PanelSecurity.PackageId);
|
||||
bool enableSubDomains = false;
|
||||
foreach(DomainInfo domain in myDomains)
|
||||
|
|
|
@ -142,6 +142,20 @@ namespace WebsitePanel.Portal
|
|||
{
|
||||
ResellersPanel.Visible = true;
|
||||
}
|
||||
|
||||
if (!(domain.IsDomainPointer || domain.IsSubDomain || domain.IsInstantAlias))
|
||||
{
|
||||
UserInfo user = UsersHelper.GetUser(PanelSecurity.EffectiveUserId);
|
||||
|
||||
if (user != null)
|
||||
{
|
||||
if (user.Role == UserRole.User)
|
||||
{
|
||||
btnDelete.Enabled = Utils.CheckQouta(Quotas.OS_ALLOWTENANTCREATEDOMAINS, cntx);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue