Significant amount of changes to hosted organizations and exchange:

Exchange 2010 SP2 provisioning separated through a new provider
Exchange 2010 SP2 now compliant with product group guidelines
Support for Database Availability Group
Fixed Distribution List view scope to only tenant
Consumer support (individual mailboxes as hotmail) added
Mailbox configuration moved to mailbox plans concept
CN creation is now based on UPN
sAMAccountName generation revised and decoupled from tenant name
2007 (ACL Based), 2010 (ACL Bases), 2010 SP2 (ABP) supported
Automated Hosted Organization provisioning added to create hosting space
Enterprise Server webservice extended with ImportMethod
Mobile tab fixed
Added more information to users listview
This commit is contained in:
robvde 2012-07-09 12:03:24 +04:00
parent 2f8a580846
commit 50f2c43315
194 changed files with 12994 additions and 9755 deletions

View file

@ -1,4 +1,4 @@
// Copyright (c) 2012, Outercurve Foundation.
// Copyright (c) 2011, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
@ -39,7 +39,7 @@ namespace WebsitePanel.Providers.HostedSolution
{
public static DirectoryEntry GetADObject(string path)
{
DirectoryEntry de = new DirectoryEntry(path);
DirectoryEntry de = new DirectoryEntry(path);
de.RefreshCache();
return de;
}
@ -48,16 +48,16 @@ namespace WebsitePanel.Providers.HostedSolution
{
bool res = false;
DirectorySearcher deSearch = new DirectorySearcher
{
Filter =
("(&(objectClass=user)(samaccountname=" + samAccountName + "))")
};
{
Filter =
("(&(objectClass=user)(samaccountname=" + samAccountName + "))")
};
//get the group result
SearchResult results = deSearch.FindOne();
DirectoryEntry de = results.GetDirectoryEntry();
PropertyValueCollection props = de.Properties["memberOf"];
foreach (string str in props)
{
if (str.IndexOf(group) != -1)
@ -81,8 +81,8 @@ namespace WebsitePanel.Providers.HostedSolution
ou = parent.Children.Add(
string.Format("OU={0}", name),
parent.SchemaClassName);
parent.SchemaClassName);
ret = ou.Path;
ou.CommitChanges();
}
@ -100,13 +100,13 @@ namespace WebsitePanel.Providers.HostedSolution
public static void DeleteADObject(string path, bool removeChild)
{
DirectoryEntry entry = GetADObject(path);
if (removeChild && entry.Children != null)
foreach (DirectoryEntry child in entry.Children)
{
entry.Children.Remove(child);
}
DirectoryEntry parent = entry.Parent;
if (parent != null)
{
@ -115,7 +115,7 @@ namespace WebsitePanel.Providers.HostedSolution
}
}
public static void DeleteADObject(string path)
{
DirectoryEntry entry = GetADObject(path);
@ -141,21 +141,34 @@ namespace WebsitePanel.Providers.HostedSolution
}
}
else
{
{
if (oDE.Properties.Contains(name))
{
oDE.Properties[name].Remove(oDE.Properties[name][0]);
}
}
}
public static void SetADObjectPropertyValue(DirectoryEntry oDE, string name, object value)
public static void SetADObjectPropertyValue(DirectoryEntry oDE, string name, string value)
{
PropertyValueCollection collection = oDE.Properties[name];
collection.Value = value;
}
public static void SetADObjectPropertyValue(DirectoryEntry oDE, string name, Guid value)
{
PropertyValueCollection collection = oDE.Properties[name];
collection.Value = value.ToByteArray();
}
public static void ClearADObjectPropertyValue(DirectoryEntry oDE, string name)
{
PropertyValueCollection collection = oDE.Properties[name];
collection.Clear();
}
public static object GetADObjectProperty(DirectoryEntry entry, string name)
{
return entry.Properties.Contains(name) ? entry.Properties[name][0] : null;
@ -164,7 +177,7 @@ namespace WebsitePanel.Providers.HostedSolution
public static string GetADObjectStringProperty(DirectoryEntry entry, string name)
{
object ret = GetADObjectProperty(entry, name);
return ret != null ? ret.ToString() : string.Empty;
return ret != null ? ret.ToString() : string.Empty;
}
public static string ConvertADPathToCanonicalName(string name)
@ -254,29 +267,38 @@ namespace WebsitePanel.Providers.HostedSolution
return ret;
}
public static string CreateUser(string path, string user, string displayName, string password, bool enabled)
{
DirectoryEntry currentADObject = new DirectoryEntry(path);
return CreateUser(path, "", user, displayName, password, enabled);
}
DirectoryEntry newUserObject = currentADObject.Children.Add("CN=" + user, "User");
newUserObject.Properties[ADAttributes.SAMAccountName].Add(user);
public static string CreateUser(string path, string upn, string user, string displayName, string password, bool enabled)
{
DirectoryEntry currentADObject = new DirectoryEntry(path);
string cn = string.Empty;
if (string.IsNullOrEmpty(upn)) cn = user; else cn = upn;
DirectoryEntry newUserObject = currentADObject.Children.Add("CN=" + cn, "User");
newUserObject.Properties[ADAttributes.SAMAccountName].Add(user);
SetADObjectProperty(newUserObject, ADAttributes.DisplayName, displayName);
newUserObject.CommitChanges();
newUserObject.Invoke(ADAttributes.SetPassword, password);
newUserObject.InvokeSet(ADAttributes.AccountDisabled, !enabled);
newUserObject.CommitChanges();
return newUserObject.Path;
}
public static void CreateGroup(string path, string group)
{
DirectoryEntry currentADObject = new DirectoryEntry(path);
DirectoryEntry currentADObject = new DirectoryEntry(path);
DirectoryEntry newGroupObject = currentADObject.Children.Add("CN=" + group, "Group");
newGroupObject.Properties[ADAttributes.SAMAccountName].Add(group);
newGroupObject.Properties[ADAttributes.GroupType].Add(-2147483640);
@ -320,7 +342,7 @@ namespace WebsitePanel.Providers.HostedSolution
if (string.IsNullOrEmpty(primaryDomainController))
{
dn = string.Format("LDAP://{0}", dn);
}
else
dn = string.Format("LDAP://{0}/{1}", primaryDomainController, dn);
@ -358,7 +380,7 @@ namespace WebsitePanel.Providers.HostedSolution
DirectoryEntry ou = GetADObject(ouPath);
PropertyValueCollection prop = null;
prop = ou.Properties["uPNSuffixes"];
prop = ou.Properties["uPNSuffixes"];
if (prop != null)
{

View file

@ -32,32 +32,35 @@ using System.Text;
namespace WebsitePanel.Providers.HostedSolution
{
public class ExchangeAccount
{
int accountId;
int itemId;
public class ExchangeAccount
{
int accountId;
int itemId;
int packageId;
ExchangeAccountType accountType;
string accountName;
string displayName;
string primaryEmailAddress;
bool mailEnabledPublicFolder;
string subscriberNumber;
ExchangeAccountType accountType;
string accountName;
string displayName;
string primaryEmailAddress;
bool mailEnabledPublicFolder;
MailboxManagerActions mailboxManagerActions;
string accountPassword;
string samAccountName;
int mailboxPlanId;
string mailboxPlan;
string publicFolderPermission;
public int AccountId
{
get { return this.accountId; }
set { this.accountId = value; }
}
public int AccountId
{
get { return this.accountId; }
set { this.accountId = value; }
}
public int ItemId
{
public int ItemId
{
get { return this.itemId; }
set { this.itemId = value; }
}
}
public int PackageId
{
@ -65,17 +68,17 @@ namespace WebsitePanel.Providers.HostedSolution
set { this.packageId = value; }
}
public ExchangeAccountType AccountType
{
get { return this.accountType; }
set { this.accountType = value; }
}
public ExchangeAccountType AccountType
{
get { return this.accountType; }
set { this.accountType = value; }
}
public string AccountName
{
get { return this.accountName; }
set { this.accountName = value; }
}
public string AccountName
{
get { return this.accountName; }
set { this.accountName = value; }
}
public string SamAccountName
{
@ -83,23 +86,23 @@ namespace WebsitePanel.Providers.HostedSolution
set { this.samAccountName = value; }
}
public string DisplayName
{
get { return this.displayName; }
set { this.displayName = value; }
}
public string DisplayName
{
get { return this.displayName; }
set { this.displayName = value; }
}
public string PrimaryEmailAddress
{
get { return this.primaryEmailAddress; }
set { this.primaryEmailAddress = value; }
}
public string PrimaryEmailAddress
{
get { return this.primaryEmailAddress; }
set { this.primaryEmailAddress = value; }
}
public bool MailEnabledPublicFolder
{
get { return this.mailEnabledPublicFolder; }
set { this.mailEnabledPublicFolder = value; }
}
public bool MailEnabledPublicFolder
{
get { return this.mailEnabledPublicFolder; }
set { this.mailEnabledPublicFolder = value; }
}
public string AccountPassword
{
@ -113,10 +116,31 @@ namespace WebsitePanel.Providers.HostedSolution
set { this.mailboxManagerActions = value; }
}
public int MailboxPlanId
{
get { return this.mailboxPlanId; }
set { this.mailboxPlanId = value; }
}
public string MailboxPlan
{
get { return this.mailboxPlan; }
set { this.mailboxPlan = value; }
}
public string SubscriberNumber
{
get { return this.subscriberNumber; }
set { this.subscriberNumber = value; }
}
public string PublicFolderPermission
{
get { return this.publicFolderPermission; }
set { this.publicFolderPermission = value; }
}
}
}
}

View file

@ -32,209 +32,219 @@ using System.Text;
namespace WebsitePanel.Providers.HostedSolution
{
public class ExchangeContact
{
string displayName;
string accountName;
string emailAddress;
bool hideFromAddressBook;
public class ExchangeContact
{
string displayName;
string accountName;
string emailAddress;
bool hideFromAddressBook;
string firstName;
string initials;
string lastName;
string firstName;
string initials;
string lastName;
string jobTitle;
string company;
string department;
string office;
ExchangeAccount managerAccount;
string jobTitle;
string company;
string department;
string office;
ExchangeAccount managerAccount;
string businessPhone;
string fax;
string homePhone;
string mobilePhone;
string pager;
string webPage;
string businessPhone;
string fax;
string homePhone;
string mobilePhone;
string pager;
string webPage;
string address;
string city;
string state;
string zip;
string country;
string address;
string city;
string state;
string zip;
string country;
string notes;
private int useMapiRichTextFormat;
ExchangeAccount[] acceptAccounts;
ExchangeAccount[] rejectAccounts;
bool requireSenderAuthentication;
string notes;
string sAMAccountName;
private int useMapiRichTextFormat;
public string DisplayName
{
get { return this.displayName; }
set { this.displayName = value; }
}
ExchangeAccount[] acceptAccounts;
ExchangeAccount[] rejectAccounts;
bool requireSenderAuthentication;
public string AccountName
{
get { return this.accountName; }
set { this.accountName = value; }
}
public string DisplayName
{
get { return this.displayName; }
set { this.displayName = value; }
}
public string EmailAddress
{
get { return this.emailAddress; }
set { this.emailAddress = value; }
}
public string AccountName
{
get { return this.accountName; }
set { this.accountName = value; }
}
public bool HideFromAddressBook
{
get { return this.hideFromAddressBook; }
set { this.hideFromAddressBook = value; }
}
public string EmailAddress
{
get { return this.emailAddress; }
set { this.emailAddress = value; }
}
public string FirstName
{
get { return this.firstName; }
set { this.firstName = value; }
}
public bool HideFromAddressBook
{
get { return this.hideFromAddressBook; }
set { this.hideFromAddressBook = value; }
}
public string Initials
{
get { return this.initials; }
set { this.initials = value; }
}
public string FirstName
{
get { return this.firstName; }
set { this.firstName = value; }
}
public string LastName
{
get { return this.lastName; }
set { this.lastName = value; }
}
public string Initials
{
get { return this.initials; }
set { this.initials = value; }
}
public string JobTitle
{
get { return this.jobTitle; }
set { this.jobTitle = value; }
}
public string LastName
{
get { return this.lastName; }
set { this.lastName = value; }
}
public string Company
{
get { return this.company; }
set { this.company = value; }
}
public string JobTitle
{
get { return this.jobTitle; }
set { this.jobTitle = value; }
}
public string Department
{
get { return this.department; }
set { this.department = value; }
}
public string Company
{
get { return this.company; }
set { this.company = value; }
}
public string Office
{
get { return this.office; }
set { this.office = value; }
}
public string Department
{
get { return this.department; }
set { this.department = value; }
}
public ExchangeAccount ManagerAccount
{
get { return this.managerAccount; }
set { this.managerAccount = value; }
}
public string Office
{
get { return this.office; }
set { this.office = value; }
}
public string BusinessPhone
{
get { return this.businessPhone; }
set { this.businessPhone = value; }
}
public ExchangeAccount ManagerAccount
{
get { return this.managerAccount; }
set { this.managerAccount = value; }
}
public string Fax
{
get { return this.fax; }
set { this.fax = value; }
}
public string BusinessPhone
{
get { return this.businessPhone; }
set { this.businessPhone = value; }
}
public string HomePhone
{
get { return this.homePhone; }
set { this.homePhone = value; }
}
public string Fax
{
get { return this.fax; }
set { this.fax = value; }
}
public string MobilePhone
{
get { return this.mobilePhone; }
set { this.mobilePhone = value; }
}
public string HomePhone
{
get { return this.homePhone; }
set { this.homePhone = value; }
}
public string Pager
{
get { return this.pager; }
set { this.pager = value; }
}
public string MobilePhone
{
get { return this.mobilePhone; }
set { this.mobilePhone = value; }
}
public string WebPage
{
get { return this.webPage; }
set { this.webPage = value; }
}
public string Pager
{
get { return this.pager; }
set { this.pager = value; }
}
public string Address
{
get { return this.address; }
set { this.address = value; }
}
public string WebPage
{
get { return this.webPage; }
set { this.webPage = value; }
}
public string City
{
get { return this.city; }
set { this.city = value; }
}
public string Address
{
get { return this.address; }
set { this.address = value; }
}
public string State
{
get { return this.state; }
set { this.state = value; }
}
public string City
{
get { return this.city; }
set { this.city = value; }
}
public string Zip
{
get { return this.zip; }
set { this.zip = value; }
}
public string State
{
get { return this.state; }
set { this.state = value; }
}
public string Country
{
get { return this.country; }
set { this.country = value; }
}
public string Zip
{
get { return this.zip; }
set { this.zip = value; }
}
public string Notes
{
get { return this.notes; }
set { this.notes = value; }
}
public string Country
{
get { return this.country; }
set { this.country = value; }
}
public ExchangeAccount[] AcceptAccounts
{
get { return this.acceptAccounts; }
set { this.acceptAccounts = value; }
}
public string Notes
{
get { return this.notes; }
set { this.notes = value; }
}
public ExchangeAccount[] RejectAccounts
{
get { return this.rejectAccounts; }
set { this.rejectAccounts = value; }
}
public ExchangeAccount[] AcceptAccounts
{
get { return this.acceptAccounts; }
set { this.acceptAccounts = value; }
}
public bool RequireSenderAuthentication
{
get { return requireSenderAuthentication; }
set { requireSenderAuthentication = value; }
}
public ExchangeAccount[] RejectAccounts
{
get { return this.rejectAccounts; }
set { this.rejectAccounts = value; }
}
public int UseMapiRichTextFormat
{
public bool RequireSenderAuthentication
{
get { return requireSenderAuthentication; }
set { requireSenderAuthentication = value; }
}
public int UseMapiRichTextFormat
{
get { return useMapiRichTextFormat; }
set { useMapiRichTextFormat = value; }
}
}
}
public string SAMAccountName
{
get { return sAMAccountName; }
set { sAMAccountName = value; }
}
}
}

View file

@ -32,72 +32,79 @@ using System.Text;
namespace WebsitePanel.Providers.HostedSolution
{
public class ExchangeDistributionList
{
public string DisplayName
{
get;
set;
}
public class ExchangeDistributionList
{
public string DisplayName
{
get;
set;
}
public string AccountName
{
get;
set;
}
public string AccountName
{
get;
set;
}
public bool HideFromAddressBook
{
get;
set;
}
public bool HideFromAddressBook
{
get;
set;
}
public ExchangeAccount[] MembersAccounts
{
get;
set;
}
public ExchangeAccount[] MembersAccounts
{
get;
set;
}
public ExchangeAccount ManagerAccount
{
get;
set;
}
public ExchangeAccount ManagerAccount
{
get;
set;
}
public string Notes
{
get;
set;
}
public string Notes
{
get;
set;
}
public ExchangeAccount[] AcceptAccounts
{
get;
set;
}
public ExchangeAccount[] AcceptAccounts
{
get;
set;
}
public ExchangeAccount[] RejectAccounts
{
get;
set;
}
public ExchangeAccount[] RejectAccounts
{
get;
set;
}
public bool RequireSenderAuthentication
{
get;
set;
}
public ExchangeAccount[] SendAsAccounts
{
get;
set;
}
public bool RequireSenderAuthentication
{
get;
set;
}
public ExchangeAccount[] SendOnBehalfAccounts
{
get;
set;
}
}
public ExchangeAccount[] SendAsAccounts
{
get;
set;
}
public ExchangeAccount[] SendOnBehalfAccounts
{
get;
set;
}
public string SAMAccountName
{
get;
set;
}
}
}

View file

@ -0,0 +1,160 @@
// Copyright (c) 2012, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Providers.HostedSolution
{
public class ExchangeMailboxPlan
{
int mailboxPlanId;
string mailboxPlan;
int mailboxSizeMB;
int maxRecipients;
int maxSendMessageSizeKB;
int maxReceiveMessageSizeKB;
bool enablePOP;
bool enableIMAP;
bool enableOWA;
bool enableMAPI;
bool enableActiveSync;
int issueWarningPct;
int prohibitSendPct;
int prohibitSendReceivePct;
int keepDeletedItemsDays;
bool isDefault;
bool hideFromAddressBook;
public int MailboxPlanId
{
get { return this.mailboxPlanId; }
set { this.mailboxPlanId = value; }
}
public string MailboxPlan
{
get { return this.mailboxPlan; }
set { this.mailboxPlan = value; }
}
public int MailboxSizeMB
{
get { return this.mailboxSizeMB; }
set { this.mailboxSizeMB = value; }
}
public bool IsDefault
{
get { return this.isDefault; }
set { this.isDefault = value; }
}
public int MaxRecipients
{
get { return this.maxRecipients; }
set { this.maxRecipients = value; }
}
public int MaxSendMessageSizeKB
{
get { return this.maxSendMessageSizeKB; }
set { this.maxSendMessageSizeKB = value; }
}
public int MaxReceiveMessageSizeKB
{
get { return this.maxReceiveMessageSizeKB; }
set { this.maxReceiveMessageSizeKB = value; }
}
public bool EnablePOP
{
get { return this.enablePOP; }
set { this.enablePOP = value; }
}
public bool EnableIMAP
{
get { return this.enableIMAP; }
set { this.enableIMAP = value; }
}
public bool EnableOWA
{
get { return this.enableOWA; }
set { this.enableOWA = value; }
}
public bool EnableMAPI
{
get { return this.enableMAPI; }
set { this.enableMAPI = value; }
}
public bool EnableActiveSync
{
get { return this.enableActiveSync; }
set { this.enableActiveSync = value; }
}
public int IssueWarningPct
{
get { return this.issueWarningPct; }
set { this.issueWarningPct = value; }
}
public int ProhibitSendPct
{
get { return this.prohibitSendPct; }
set { this.prohibitSendPct = value; }
}
public int ProhibitSendReceivePct
{
get { return this.prohibitSendReceivePct; }
set { this.prohibitSendReceivePct = value; }
}
public int KeepDeletedItemsDays
{
get { return this.keepDeletedItemsDays; }
set { this.keepDeletedItemsDays = value; }
}
public bool HideFromAddressBook
{
get { return this.hideFromAddressBook; }
set { this.hideFromAddressBook = value; }
}
}
}

View file

@ -30,70 +30,71 @@ namespace WebsitePanel.Providers.HostedSolution
{
public interface IExchangeServer
{
bool CheckAccountCredentials(string username, string password);
// Organizations
// Organizations
string CreateMailEnableUser(string upn, string organizationId, string organizationDistinguishedName, ExchangeAccountType accountType,
string mailboxDatabase, string offlineAddressBook,
string accountName, bool enablePOP, bool enableIMAP,
bool enableOWA, bool enableMAPI, bool enableActiveSync,
int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB,
int keepDeletedItemsDays);
Organization ExtendToExchangeOrganization(string organizationId, string securityGroup);
string GetOABVirtualDirectory();
Organization CreateOrganizationOfflineAddressBook(string organizationId, string securityGroup, string oabVirtualDir);
void UpdateOrganizationOfflineAddressBook(string id);
bool DeleteOrganization(string organizationId, string distinguishedName, string globalAddressList, string addressList, string roomsAddressList, string offlineAddressBook, string securityGroup);
void SetOrganizationStorageLimits(string organizationDistinguishedName, int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays);
ExchangeItemStatistics[] GetMailboxesStatistics(string organizationDistinguishedName);
string CreateMailEnableUser(string upn, string organizationId, string organizationDistinguishedName, ExchangeAccountType accountType,
string mailboxDatabase, string offlineAddressBook, string addressBookPolicy,
string accountName, bool enablePOP, bool enableIMAP,
bool enableOWA, bool enableMAPI, bool enableActiveSync,
int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB,
int keepDeletedItemsDays, int maxRecipients, int maxSendMessageSizeKB, int maxReceiveMessageSizeKB, bool hideFromAddressBook, bool isConsumer);
// Domains
Organization ExtendToExchangeOrganization(string organizationId, string securityGroup, bool IsConsumer);
string GetOABVirtualDirectory();
Organization CreateOrganizationOfflineAddressBook(string organizationId, string securityGroup, string oabVirtualDir);
Organization CreateOrganizationAddressBookPolicy(string organizationId, string gal, string addressBook, string roomList, string oab);
void UpdateOrganizationOfflineAddressBook(string id);
bool DeleteOrganization(string organizationId, string distinguishedName, string globalAddressList, string addressList, string roomList, string offlineAddressBook, string securityGroup, string addressBookPolicy);
void SetOrganizationStorageLimits(string organizationDistinguishedName, int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays);
ExchangeItemStatistics[] GetMailboxesStatistics(string organizationDistinguishedName);
// Domains
void AddAuthoritativeDomain(string domain);
void DeleteAuthoritativeDomain(string domain);
string[] GetAuthoritativeDomains();
string[] GetAuthoritativeDomains();
// Mailboxes
string CreateMailbox(string organizationId, string organizationDistinguishedName, string mailboxDatabase, string securityGroup, string offlineAddressBook, ExchangeAccountType accountType, string displayName, string accountName, string name, string domain, string password, bool enablePOP, bool enableIMAP, bool enableOWA, bool enableMAPI, bool enableActiveSync,
int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays);
void DeleteMailbox(string accountName);
// Mailboxes
//string CreateMailbox(string organizationId, string organizationDistinguishedName, string mailboxDatabase, string securityGroup, string offlineAddressBook, string addressBookPolicy, ExchangeAccountType accountType, string displayName, string accountName, string name, string domain, string password, bool enablePOP, bool enableIMAP, bool enableOWA, bool enableMAPI, bool enableActiveSync,
// int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays, int maxRecipients, int maxSendMessageSizeKB, int maxReceiveMessageSizeKB,bool hideFromAddressBook);
void DeleteMailbox(string accountName);
void DisableMailbox(string id);
ExchangeMailbox GetMailboxGeneralSettings(string accountName);
void SetMailboxGeneralSettings(string accountName, string displayName, string password, bool hideFromAddressBook, bool disabled, string firstName, string initials, string lastName, string address, string city, string state, string zip, string country, string jobTitle, string company, string department, string office, string managerAccountName, string businessPhone, string fax, string homePhone, string mobilePhone, string pager, string webPage, string notes);
ExchangeMailbox GetMailboxMailFlowSettings(string accountName);
void SetMailboxMailFlowSettings(string accountName, bool enableForwarding, string forwardingAccountName, bool forwardToBoth, string[] sendOnBehalfAccounts, string[] acceptAccounts, string[] rejectAccounts, int maxRecipients, int maxSendMessageSizeKB, int maxReceiveMessageSizeKB, bool requireSenderAuthentication);
ExchangeMailbox GetMailboxAdvancedSettings(string accountName);
void SetMailboxAdvancedSettings(string organizationId, string accountName, bool enablePOP, bool enableIMAP, bool enableOWA, bool enableMAPI, bool enableActiveSync, int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays);
ExchangeEmailAddress[] GetMailboxEmailAddresses(string accountName);
void SetMailboxEmailAddresses(string accountName, string[] emailAddresses);
void SetMailboxPrimaryEmailAddress(string accountName, string emailAddress);
void SetMailboxPermissions(string organizationId, string accountName, string[] sendAsAccounts, string[] fullAccessAccounts);
ExchangeMailbox GetMailboxPermissions(string organizationId, string accountName);
ExchangeMailboxStatistics GetMailboxStatistics(string accountName);
ExchangeMailbox GetMailboxGeneralSettings(string accountName);
void SetMailboxGeneralSettings(string accountName, bool hideFromAddressBook, bool disabled);
ExchangeMailbox GetMailboxMailFlowSettings(string accountName);
void SetMailboxMailFlowSettings(string accountName, bool enableForwarding, string forwardingAccountName, bool forwardToBoth, string[] sendOnBehalfAccounts, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication);
ExchangeMailbox GetMailboxAdvancedSettings(string accountName);
void SetMailboxAdvancedSettings(string organizationId, string accountName, bool enablePOP, bool enableIMAP, bool enableOWA, bool enableMAPI, bool enableActiveSync, int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays, int maxRecipients, int maxSendMessageSizeKB, int maxReceiveMessageSizeKB);
ExchangeEmailAddress[] GetMailboxEmailAddresses(string accountName);
void SetMailboxEmailAddresses(string accountName, string[] emailAddresses);
void SetMailboxPrimaryEmailAddress(string accountName, string emailAddress);
void SetMailboxPermissions(string organizationId, string accountName, string[] sendAsAccounts, string[] fullAccessAccounts);
ExchangeMailbox GetMailboxPermissions(string organizationId, string accountName);
ExchangeMailboxStatistics GetMailboxStatistics(string accountName);
// Contacts
void CreateContact(string organizationId, string organizationDistinguishedName, string contactDisplayName, string contactAccountName, string contactEmail, string defaultOrganizationDomain);
void DeleteContact(string accountName);
ExchangeContact GetContactGeneralSettings(string accountName);
// Contacts
void CreateContact(string organizationId, string organizationDistinguishedName, string contactDisplayName, string contactAccountName, string contactEmail, string defaultOrganizationDomain);
void DeleteContact(string accountName);
ExchangeContact GetContactGeneralSettings(string accountName);
void SetContactGeneralSettings(string accountName, string displayName, string email, bool hideFromAddressBook, string firstName, string initials, string lastName, string address, string city, string state, string zip, string country, string jobTitle, string company, string department, string office, string managerAccountName, string businessPhone, string fax, string homePhone, string mobilePhone, string pager, string webPage, string notes, int useMapiRichTextFormat, string defaultDomain);
ExchangeContact GetContactMailFlowSettings(string accountName);
void SetContactMailFlowSettings(string accountName, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication);
ExchangeContact GetContactMailFlowSettings(string accountName);
void SetContactMailFlowSettings(string accountName, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication);
// Distribution Lists
void CreateDistributionList(string organizationId, string organizationDistinguishedName, string displayName, string accountName, string name, string domain, string managedBy);
void DeleteDistributionList(string accountName);
ExchangeDistributionList GetDistributionListGeneralSettings(string accountName);
void SetDistributionListGeneralSettings(string accountName, string displayName, bool hideFromAddressBook, string managedBy, string[] memebers, string notes);
void AddDistributionListMembers(string accountName, string[] memberAccounts);
void RemoveDistributionListMembers(string accountName, string[] memberAccounts);
ExchangeDistributionList GetDistributionListMailFlowSettings(string accountName);
void SetDistributionListMailFlowSettings(string accountName, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication);
ExchangeEmailAddress[] GetDistributionListEmailAddresses(string accountName);
void SetDistributionListEmailAddresses(string accountName, string[] emailAddresses);
void SetDistributionListPrimaryEmailAddress(string accountName, string emailAddress);
ExchangeDistributionList GetDistributionListPermissions(string organizationId, string accountName);
void SetDistributionListPermissions(string organizationId, string accountName, string[] sendAsAccounts, string[] sendOnBehalfAccounts);
// Distribution Lists
void CreateDistributionList(string organizationId, string organizationDistinguishedName, string displayName, string accountName, string name, string domain, string managedBy, string[] addressLists);
void DeleteDistributionList(string accountName);
ExchangeDistributionList GetDistributionListGeneralSettings(string accountName);
void SetDistributionListGeneralSettings(string accountName, string displayName, bool hideFromAddressBook, string managedBy, string[] memebers, string notes, string[] addressLists);
void AddDistributionListMembers(string accountName, string[] memberAccounts, string[] addressLists);
void RemoveDistributionListMembers(string accountName, string[] memberAccounts, string[] addressLists);
ExchangeDistributionList GetDistributionListMailFlowSettings(string accountName);
void SetDistributionListMailFlowSettings(string accountName, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, string[] addressLists);
ExchangeEmailAddress[] GetDistributionListEmailAddresses(string accountName);
void SetDistributionListEmailAddresses(string accountName, string[] emailAddresses, string[] addressLists);
void SetDistributionListPrimaryEmailAddress(string accountName, string emailAddress, string[] addressLists);
ExchangeDistributionList GetDistributionListPermissions(string organizationId, string accountName);
void SetDistributionListPermissions(string organizationId, string accountName, string[] sendAsAccounts, string[] sendOnBehalfAccounts, string[] addressLists);
// Public Folders
void CreatePublicFolder(string organizationId, string securityGroup, string parentFolder, string folderName, bool mailEnabled, string accountName, string name, string domain);
@ -111,20 +112,20 @@ namespace WebsitePanel.Providers.HostedSolution
string[] GetPublicFoldersRecursive(string parent);
long GetPublicFolderSize(string folder);
//ActiveSync
void CreateOrganizationActiveSyncPolicy(string organizationId);
ExchangeActiveSyncPolicy GetActiveSyncPolicy(string organizationId);
void SetActiveSyncPolicy(string organizationId, bool allowNonProvisionableDevices, bool attachmentsEnabled,
int maxAttachmentSizeKB, bool uncAccessEnabled, bool wssAccessEnabled, bool devicePasswordEnabled,
bool alphanumericPasswordRequired, bool passwordRecoveryEnabled, bool deviceEncryptionEnabled,
bool allowSimplePassword, int maxPasswordFailedAttempts, int minPasswordLength, int inactivityLockMin,
int passwordExpirationDays, int passwordHistory, int refreshInterval);
//ActiveSync
void CreateOrganizationActiveSyncPolicy(string organizationId);
ExchangeActiveSyncPolicy GetActiveSyncPolicy(string organizationId);
void SetActiveSyncPolicy(string organizationId, bool allowNonProvisionableDevices, bool attachmentsEnabled,
int maxAttachmentSizeKB, bool uncAccessEnabled, bool wssAccessEnabled, bool devicePasswordEnabled,
bool alphanumericPasswordRequired, bool passwordRecoveryEnabled, bool deviceEncryptionEnabled,
bool allowSimplePassword, int maxPasswordFailedAttempts, int minPasswordLength, int inactivityLockMin,
int passwordExpirationDays, int passwordHistory, int refreshInterval);
//Mobile Devices
ExchangeMobileDevice[] GetMobileDevices(string accountName);
ExchangeMobileDevice GetMobileDevice(string id);
void WipeDataFromDevice(string id);
void CancelRemoteWipeRequest(string id);
void RemoveDevice(string id);
}
//Mobile Devices
ExchangeMobileDevice[] GetMobileDevices(string accountName);
ExchangeMobileDevice GetMobileDevice(string id);
void WipeDataFromDevice(string id);
void CancelRemoteWipeRequest(string id);
void RemoveDevice(string id);
}
}

View file

@ -33,10 +33,10 @@ namespace WebsitePanel.Providers.HostedSolution
public interface IOrganization
{
Organization CreateOrganization(string organizationId);
void DeleteOrganization(string organizationId);
void CreateUser(string organizationId, string loginName, string displayName, string upn, string password, bool enabled);
int CreateUser(string organizationId, string loginName, string displayName, string upn, string password, bool enabled);
void DeleteUser(string loginName, string organizationId);
@ -49,7 +49,7 @@ namespace WebsitePanel.Providers.HostedSolution
string jobTitle,
string company, string department, string office, string managerAccountName,
string businessPhone, string fax, string homePhone, string mobilePhone, string pager,
string webPage, string notes, string externalEmail);
string webPage, string notes, string externalEmail);
bool OrganizationExists(string organizationId);
@ -58,5 +58,7 @@ namespace WebsitePanel.Providers.HostedSolution
void CreateOrganizationDomain(string organizationDistinguishedName, string domain);
PasswordPolicyResult GetPasswordPolicy();
string GetSamAccountNameByUserPrincipalName(string organizationId, string userPrincipalName);
}
}

View file

@ -41,12 +41,12 @@ namespace WebsitePanel.Providers.HostedSolution
private string addressList;
private string roomsAddressList;
private string globalAddressList;
private string addressBookPolicy;
private string database;
private string securityGroup;
private string lyncTenantId;
private int diskSpace;
private int issueWarningKB;
private int prohibitSendKB;
private int prohibitSendReceiveKB;
private int keepDeletedItemsDays;
@ -125,7 +125,7 @@ namespace WebsitePanel.Providers.HostedSolution
get { return crmCurrency; }
set { crmCurrency = value; }
}
[Persistent]
public string DistinguishedName
{
@ -151,7 +151,7 @@ namespace WebsitePanel.Providers.HostedSolution
{
return defaultDomain;
}
}
}
[Persistent]
@ -182,6 +182,13 @@ namespace WebsitePanel.Providers.HostedSolution
set { globalAddressList = value; }
}
[Persistent]
public string AddressBookPolicy
{
get { return addressBookPolicy; }
set { addressBookPolicy = value; }
}
[Persistent]
public string Database
{
@ -203,27 +210,6 @@ namespace WebsitePanel.Providers.HostedSolution
set { diskSpace = value; }
}
[Persistent]
public int IssueWarningKB
{
get { return issueWarningKB; }
set { issueWarningKB = value; }
}
[Persistent]
public int ProhibitSendKB
{
get { return prohibitSendKB; }
set { prohibitSendKB = value; }
}
[Persistent]
public int ProhibitSendReceiveKB
{
get { return prohibitSendReceiveKB; }
set { prohibitSendReceiveKB = value; }
}
[Persistent]
public int KeepDeletedItemsDays
{
@ -233,5 +219,15 @@ namespace WebsitePanel.Providers.HostedSolution
[Persistent]
public bool IsOCSOrganization { get; set; }
[Persistent]
public string LyncTenantId
{
get { return lyncTenantId; }
set { lyncTenantId = value; }
}
}
}

View file

@ -37,6 +37,7 @@ namespace WebsitePanel.Providers.HostedSolution
private int accountId;
private int itemId;
private int packageId;
private string subscriberNumber;
private string primaryEmailAddress;
private string accountPassword;
@ -298,5 +299,13 @@ namespace WebsitePanel.Providers.HostedSolution
set { isBlackBerryUser = value; }
}
public string SubscriberNumber
{
get { return subscriberNumber; }
set { subscriberNumber = value; }
}
}
}

View file

@ -0,0 +1,71 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace WebsitePanel.Providers.HostedSolution
{
public class TransactionAction
{
private TransactionActionTypes actionType;
public TransactionActionTypes ActionType
{
get { return actionType; }
set { actionType = value; }
}
private string id;
public string Id
{
get { return id; }
set { id = value; }
}
private string suffix;
public string Suffix
{
get { return suffix; }
set { suffix = value; }
}
private string account;
public string Account
{
get { return account; }
set { account = value; }
}
public enum TransactionActionTypes
{
CreateOrganizationUnit,
CreateGlobalAddressList,
CreateAddressList,
CreateAddressBookPolicy,
CreateOfflineAddressBook,
CreateDistributionGroup,
EnableDistributionGroup,
CreateAcceptedDomain,
AddUPNSuffix,
CreateMailbox,
CreateContact,
CreatePublicFolder,
CreateActiveSyncPolicy,
AddMailboxFullAccessPermission,
AddSendAsPermission,
RemoveMailboxFullAccessPermission,
RemoveSendAsPermission,
EnableMailbox,
LyncNewSipDomain,
LyncNewSimpleUrl,
LyncNewUser,
LyncNewConferencingPolicy,
LyncNewExternalAccessPolicy,
LyncNewMobilityPolicy
};
}
}

View file

@ -79,6 +79,8 @@
<Compile Include="HostedSolution\BlackBerryErrorsCodes.cs" />
<Compile Include="HostedSolution\BlackBerryStatsItem.cs" />
<Compile Include="HostedSolution\BlackBerryUserDeleteState.cs" />
<Compile Include="HostedSolution\ExchangeMailboxPlan.cs" />
<Compile Include="HostedSolution\TransactionAction.cs" />
<Compile Include="ResultObjects\HeliconApe.cs" />
<Compile Include="HostedSolution\ExchangeMobileDevice.cs" />
<Compile Include="HostedSolution\IOCSEdgeServer.cs" />