Exemplo n.º 1
0
        // Token: 0x06001518 RID: 5400 RVA: 0x000789A8 File Offset: 0x00076BA8
        private void PublishExchangeResourcesToAAD(IRecipientSession adSession, ADUser adUser, InvokeArgs invokeArgs, List <KeyValuePair <string, object> > customDataToLog)
        {
            MailboxSession mailboxSession = invokeArgs.StoreSession as MailboxSession;

            try
            {
                int?valueOrDefault = mailboxSession.Mailbox.GetValueOrDefault <int?>(MailboxSchema.GroupMailboxExchangeResourcesPublishedVersion, null);
                if (GroupMailboxAssistantType.IsGroupMailboxExchangeResourcesVersionOutdated(valueOrDefault, invokeArgs.MailboxData.MailboxGuid))
                {
                    if (new GroupMailboxExchangeResourcesPublisher(adUser, default(Guid)).Publish(valueOrDefault))
                    {
                        mailboxSession.Mailbox[MailboxSchema.GroupMailboxExchangeResourcesPublishedVersion] = 1;
                        mailboxSession.Mailbox.Save();
                        mailboxSession.Mailbox.Load();
                    }
                }
            }
            catch (LocalizedException ex)
            {
                GroupMailboxAssistant.Tracer.TraceError((long)this.GetHashCode(), "ActivityId : {0} ; Mailbox : TypeDetail {1} , SmtpAddress {2}, ExchangeGuid {3} cannot publish exchange resources, Parameters {4}. Exception: {5}", new object[]
                {
                    invokeArgs.ActivityId,
                    mailboxSession.MailboxOwner.RecipientTypeDetails,
                    mailboxSession.MailboxOwner.MailboxInfo.PrimarySmtpAddress.ToString(),
                    mailboxSession.MailboxOwner.MailboxInfo.MailboxGuid,
                    invokeArgs.Parameters,
                    ex
                });
                customDataToLog.Add(new KeyValuePair <string, object>("PublishExchangeResourcesToAAD", string.Format("Cannot publish exchange resources to AAD for mailbox {0} exception {1}", adUser.ExternalDirectoryObjectId, ex)));
            }
        }
Exemplo n.º 2
0
        // Token: 0x06001519 RID: 5401 RVA: 0x00078B00 File Offset: 0x00076D00
        private void UpdateGroupMailboxMembership(MailboxSession mailboxSession)
        {
            int?valueOrDefault = mailboxSession.Mailbox.GetValueOrDefault <int?>(MailboxSchema.GroupMailboxPermissionsVersion, null);

            if (!GroupMailboxAssistantType.IsGroupMailboxPermissionsVersionOutdated(valueOrDefault, mailboxSession.MailboxGuid))
            {
                return;
            }
            GroupMailboxMembershipUpdater groupMailboxMembershipUpdater = new GroupMailboxMembershipUpdater(mailboxSession);

            groupMailboxMembershipUpdater.Update();
        }
Exemplo n.º 3
0
        // Token: 0x06001526 RID: 5414 RVA: 0x00078CA0 File Offset: 0x00076EA0
        public bool IsMailboxInteresting(MailboxInformation mailboxInformation)
        {
            GroupMailboxAssistantType.Tracer.TraceFunction((long)this.GetHashCode(), "GroupMailboxAssistantType.IsMailboxInteresting");
            if (!mailboxInformation.IsGroupMailbox())
            {
                GroupMailboxAssistantType.Tracer.TraceDebug <Guid>((long)this.GetHashCode(), "[{0}]: mailbox is a not group mailbox.", mailboxInformation.MailboxGuid);
                return(false);
            }
            int?num          = mailboxInformation.GetMailboxProperty(MailboxSchema.GroupMailboxPermissionsVersion) as int?;
            int?photoVersion = mailboxInformation.GetMailboxProperty(MailboxSchema.GroupMailboxGeneratedPhotoVersion) as int?;

            mailboxInformation.GetMailboxProperty(MailboxSchema.GroupMailboxExchangeResourcesPublishedVersion);
            return(GroupMailboxAssistantType.IsGroupMailboxGeneratedPhotoOutdated(photoVersion, mailboxInformation.MailboxGuid) || GroupMailboxAssistantType.IsGroupMailboxPermissionsVersionOutdated(num, mailboxInformation.MailboxGuid) || GroupMailboxAssistantType.IsGroupMailboxExchangeResourcesVersionOutdated(num, mailboxInformation.MailboxGuid));
        }