private static RecipientTypeDetails CalculateLegacyMailboxRTD(ADUser user) { if (MailboxMoveHelper.IsLinkedAccount(user)) { return(RecipientTypeDetails.LinkedMailbox); } if (MailboxMoveHelper.IsSelfSid(user.MasterAccountSid)) { return(RecipientTypeDetails.SharedMailbox); } return(RecipientTypeDetails.UserMailbox); }
private static bool IsSecurityPrincipal(ADUser user) { return(!MailboxMoveHelper.IsSelfSid(user.MasterAccountSid) && ((user.UserAccountControl & UserAccountControlFlags.AccountDisabled) == UserAccountControlFlags.None || MailboxMoveHelper.IsLinkedAccount(user))); }