This commit is contained in:
dev_amdtel 2013-10-30 09:12:06 +04:00
commit 8dcd01cb20
17 changed files with 105 additions and 17 deletions

View file

@ -145,7 +145,7 @@ function websitepanel_addons_output($params)
if ($_POST && isset($_POST['action']) && $_POST['action'] == 'add')
{
// Sanity check to make sure the WHMCS addon ID exists
$results = select_query('mod_wspaddons', 'id', array('id' => $_POST['whmcs_id']));
$results = select_query('tbladdons', 'id', array('id' => $_POST['whmcs_id']));
if (mysql_num_rows($results) > 0)
{
$results = select_query('mod_wspaddons', 'whmcs_id', array('whmcs_id' => $_POST['whmcs_id']));

View file

@ -2581,8 +2581,11 @@ namespace WebsitePanel.EnterpriseServer
OrganizationSecurityGroup tmpSecurityGroup = GetSecurityGroupGeneralSettings(itemId, account.AccountId);
if (tmpSecurityGroup != null)
{
account.Notes = tmpSecurityGroup.Notes;
accounts.Add(account);
}
}
result.PageItems = accounts.ToArray();

View file

@ -50,6 +50,7 @@ namespace WebsitePanel.Providers.HostedSolution
string mailboxPlan;
string publicFolderPermission;
string userPrincipalName;
string notes;
public int AccountId
{
@ -149,5 +150,10 @@ namespace WebsitePanel.Providers.HostedSolution
set { this.userPrincipalName = value; }
}
public string Notes
{
get { return this.notes; }
set { this.notes = value; }
}
}
}

View file

@ -102,6 +102,8 @@ namespace WebsitePanel.Providers.HostedSolution
long recoverabelItemsSpace;
long recoverabelItemsWarning;
string exchangeGuid;
public string DisplayName
@ -424,5 +426,12 @@ namespace WebsitePanel.Providers.HostedSolution
set { this.recoverabelItemsWarning = value; }
}
public string ExchangeGuid
{
get { return this.exchangeGuid; }
set { this.exchangeGuid = value; }
}
}
}

View file

@ -2296,6 +2296,7 @@ namespace WebsitePanel.Providers.HostedSolution
info.DisplayName = (string)GetPSObjectProperty(mailbox, "DisplayName");
info.HideFromAddressBook = (bool)GetPSObjectProperty(mailbox, "HiddenFromAddressListsEnabled");
info.ExchangeGuid = GetPSObjectProperty(mailbox, "ExchangeGuid").ToString();
Command cmd = new Command("Get-User");

View file

@ -637,7 +637,7 @@ namespace WebsitePanel.Providers.HostedSolution
command = new Command("Set-CsSimpleUrlConfiguration");
command.Parameters.Add("Identity", "Global");
command.Parameters.Add("Tenant", id);
//command.Parameters.Add("Tenant", id);
command.Parameters.Add("SimpleUrl", SimpleUrls);
ExecuteShellCommand(runspace, command, false);
}

View file

@ -202,6 +202,7 @@ namespace WebsitePanel.Providers.HostedSolution
ActiveDirectoryUtils.SetADObjectPropertyValue(ou, "msRTCSIP-Domains", sipDomain);
ActiveDirectoryUtils.SetADObjectPropertyValue(ou, "msRTCSIP-TenantId", id);
ActiveDirectoryUtils.SetADObjectPropertyValue(ou, "msRTCSIP-ObjectId", id);
ActiveDirectoryUtils.SetADObjectPropertyValue(ou, "msRTCSIP-DomainUrlMap", sipDomain + "#" + SimpleUrlRoot+sipDomain);
ou.CommitChanges();
//Create simpleurls

View file

@ -56,22 +56,21 @@ namespace WebsitePanel.Portal
txtHostName.Text = "";
}
DomainType type = GetDomainType(Request["DomainType"]);
if ((PanelSecurity.LoggedUser.Role == UserRole.User) & (type != DomainType.SubDomain))
{
if (cntx.Groups.ContainsKey(ResourceGroups.Dns))
{
if (!PackagesHelper.CheckGroupQuotaEnabled(PanelSecurity.PackageId, ResourceGroups.Dns, Quotas.DNS_EDITOR))
this.DisableControls = true;
}
}
}
catch (Exception ex)
{
ShowErrorMessage("DOMAIN_GET_DOMAIN", ex);
}
DomainType type = GetDomainType(Request["DomainType"]);
if ((PanelSecurity.LoggedUser.Role == UserRole.User) & (type != DomainType.SubDomain))
{
if (!PackagesHelper.CheckGroupQuotaEnabled(PanelSecurity.PackageId, ResourceGroups.Dns, Quotas.DNS_EDITOR))
this.DisableControls = true;
}
}
private void BindControls()

View file

@ -168,4 +168,10 @@
<data name="secLitigationHoldSettings.Text" xml:space="preserve">
<value>Litigation Hold</value>
</data>
<data name="locExchangeGuid.Text" xml:space="preserve">
<value>Exchange Guid:</value>
</data>
<data name="secAdvancedInfo.Text" xml:space="preserve">
<value>Advanced Information</value>
</data>
</root>

View file

@ -150,4 +150,7 @@
<data name="Text.PageName" xml:space="preserve">
<value>Groups</value>
</data>
<data name="gvGroupsNotes.Header" xml:space="preserve">
<value>Notes</value>
</data>
</root>

View file

@ -120,6 +120,16 @@
</tr>
</table>
<wsp:CollapsiblePanel id="secAdvancedInfo" runat="server" TargetControlID="AdvancedInfo" meta:resourcekey="secAdvancedInfo" Text="Advanced Information" IsCollapsed="true"></wsp:CollapsiblePanel>
<asp:Panel ID="AdvancedInfo" runat="server" Height="0" style="overflow:hidden;">
<table>
<tr>
<td class="FormLabel150"> <asp:Localize ID="locExchangeGuid" runat="server" meta:resourcekey="locExchangeGuid" Text="Exchange Guid:"></asp:Localize></td>
<td><asp:Label runat="server" ID="lblExchangeGuid" /></td>
</tr>
</table>
</asp:Panel>
<div class="FormFooterClean">
<asp:Button id="btnSave" runat="server" Text="Save Changes" CssClass="Button1"
meta:resourcekey="btnSave" ValidationGroup="EditMailbox" OnClick="btnSave_Click"></asp:Button>

View file

@ -98,6 +98,8 @@ namespace WebsitePanel.Portal.ExchangeServer
chkHideAddressBook.Checked = mailbox.HideFromAddressBook;
chkDisable.Checked = mailbox.Disabled;
lblExchangeGuid.Text = string.IsNullOrEmpty(mailbox.ExchangeGuid) ? "<>" : mailbox.ExchangeGuid ;
// get account meta
ExchangeAccount account = ES.Services.ExchangeServer.GetAccount(PanelRequest.ItemID, PanelRequest.AccountID);
chkPmmAllowed.Checked = (account.MailboxManagerActions & MailboxManagerActions.GeneralSettings) > 0;

View file

@ -25,7 +25,6 @@
// 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.
@ -301,6 +300,42 @@ namespace WebsitePanel.Portal.ExchangeServer {
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox chkPmmAllowed;
/// <summary>
/// secAdvancedInfo control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::WebsitePanel.Portal.CollapsiblePanel secAdvancedInfo;
/// <summary>
/// AdvancedInfo 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.Panel AdvancedInfo;
/// <summary>
/// locExchangeGuid 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 locExchangeGuid;
/// <summary>
/// lblExchangeGuid 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 lblExchangeGuid;
/// <summary>
/// btnSave control.
/// </summary>

View file

@ -49,11 +49,11 @@
<asp:GridView ID="gvGroups" runat="server" AutoGenerateColumns="False" EnableViewState="true"
Width="100%" EmptyDataText="gvGroups" CssSelectorClass="NormalGridView"
OnRowCommand="gvSecurityGroups_RowCommand" AllowPaging="True" AllowSorting="True"
OnRowCommand="gvSecurityGroups_RowCommand" OnRowDataBound="gvSecurityGroups_RowDataBound" AllowPaging="True" AllowSorting="True"
DataSourceID="odsSecurityGroupsPaged" PageSize="20">
<Columns>
<asp:TemplateField HeaderText="gvGroupsDisplayName" SortExpression="DisplayName">
<ItemStyle Width="100%"></ItemStyle>
<ItemStyle Width="35%"></ItemStyle>
<ItemTemplate>
<asp:hyperlink id="lnk1" runat="server"
NavigateUrl='<%# GetListEditUrl(Eval("AccountId").ToString()) %>'>
@ -61,6 +61,7 @@
</asp:hyperlink>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField HeaderText="gvGroupsNotes" DataField="Notes" ItemStyle-Width="65%" />
<asp:TemplateField>
<ItemTemplate>
<asp:ImageButton ID="cmdDelete" runat="server" Text="Delete" SkinID="ExchangeDelete"

View file

@ -44,6 +44,8 @@ namespace WebsitePanel.Portal.ExchangeServer
{
public partial class OrganizationSecurityGroups : WebsitePanelModuleBase
{
protected const int _NotesMaxLength = 100;
protected void Page_Load(object sender, EventArgs e)
{
@ -102,6 +104,14 @@ namespace WebsitePanel.Portal.ExchangeServer
}
}
protected void gvSecurityGroups_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow && e.Row.Cells[1].Text.Length > _NotesMaxLength)
{
e.Row.Cells[1].Text = e.Row.Cells[1].Text.Substring(0, _NotesMaxLength - 3) + "...";
}
}
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
gvGroups.PageSize = Convert.ToInt16(ddlPageSize.SelectedValue);

View file

@ -57,7 +57,7 @@
<ItemTemplate>
<asp:Image ID="img1" runat="server" ImageUrl='<%# GetAccountImage((int)Eval("AccountType")) %>' ImageAlign="AbsMiddle" />
<asp:LinkButton ID="cmdSelectAccount" CommandName="SelectAccount"
CommandArgument='<%# Eval("AccountName").ToString() + "|" + Eval("DisplayName").ToString()+ "|" + Eval("PrimaryEmailAddress")+ "|" + Eval("AccountId")%>'
CommandArgument='<%# Eval("AccountName").ToString() + "^" + Eval("DisplayName").ToString()+ "^" + Eval("PrimaryEmailAddress")+ "^" + Eval("AccountId")%>'
runat="server" Text='<%# Eval("DisplayName") %>'></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>

View file

@ -31,6 +31,7 @@ using System.Collections.Generic;
using System.Web.UI;
using System.Web.UI.WebControls;
using WebsitePanel.Providers.HostedSolution;
using System.Text.RegularExpressions;
namespace WebsitePanel.Portal.ExchangeServer.UserControls
{
@ -218,7 +219,8 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
{
if (e.CommandName == "SelectAccount")
{
string[] parts = e.CommandArgument.ToString().Split('|');
string[] parts = e.CommandArgument.ToString().Split('^');
ExchangeAccount account = new ExchangeAccount();
account.AccountName = parts[0];
account.DisplayName = parts[1];